Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't get my debugger to stop breaking on first-chance 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?

like image 620
Isaac Moses Avatar asked Dec 23 '22 14:12

Isaac Moses


1 Answers

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.

like image 90
Orion Edwards Avatar answered Apr 05 '23 23:04

Orion Edwards