我无法让调试器在第一次异常时停止中断

发布于 2024-07-05 12:05:04 字数 225 浏览 8 评论 0原文

我正在使用 Visual C++ 2003 通过 TCP/IP 远程调试程序。

我设置了 Win32 异常 c00000005(“访问冲突”),以便在抛出时闯入调试器。 然后,我将其设置回“使用父设置”。 父级 Win32 Exceptions 的设置是在引发异常时继续。

现在,当我调试程序时,每次抛出异常都会中断,迫使我单击“继续”以使其继续调试。 我怎样才能让它不再像这样破裂?

I'm using Visual C++ 2003 to debug a program remotely via TCP/IP.

I had set the Win32 exception c00000005, "Access violation," to break into the debugger when thrown. Then, I set it back to "Use parent setting." The setting for the parent, Win32 Exceptions, is to continue when the exception is thrown.

Now, when I debug the program, it breaks each time that exception is thrown, forcing me to click Continue to let it keep debugging. How do I get it to stop breaking like this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

守望孤独 2024-07-12 12:05:04

我想支持 Will Dean 的回答

访问冲突听起来像是代码中的实际错误。 我不希望底层 C/++ 运行时在内部抛出和捕获。

“第一次机会异常”功能使您可以使用调试器拦截代码中“捕获”的内容并进行查看。 如果没有任何东西“捕获”该异常(这是有道理的,为什么您要捕获并忽略访问冲突?),那么无论您设置了什么选项,它都会触发调试器。

I'd like to support Will Dean's answer

An access violation sounds like an actual bug in your code. It's not something I'd expect the underlying C/++ Runtime to be throwing and catching internally.

The 'first-chance-exceptions' feature is so you can intercept things which get 'caught' in code, using the debugger, and have a look. If there's nothing 'catching' that exception (which makes sense, why on earth would you catch and ignore access violations?), then it will trigger the debugger regardless of what options you may have set.

沫雨熙 2024-07-12 12:05:04

如果您没有在调试器中运行,那么您的代码实际上会处理这种异常吗?

Is this an exception that your code would actually handle if you weren't running in the debugger?

忆梦 2024-07-12 12:05:04

Ctrl+Alt+E(或 Debug\Exceptions)

从那里您可以选择中断哪些异常。

Ctrl+Alt+E (or Debug\Exceptions)

From there you can select which exceptions break.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文