我无法让调试器在第一次异常时停止中断
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想支持 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.
如果您没有在调试器中运行,那么您的代码实际上会处理这种异常吗?
Is this an exception that your code would actually handle if you weren't running in the debugger?
Ctrl+Alt+E(或 Debug\Exceptions)
从那里您可以选择中断哪些异常。
Ctrl+Alt+E (or Debug\Exceptions)
From there you can select which exceptions break.