4

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?

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
Isaac Moses
  • 1,589
  • 6
  • 26
  • 44

3 Answers3

5

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

Will Dean
  • 39,055
  • 11
  • 90
  • 118
5

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.

Community
  • 1
  • 1
Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
  • too bad this seems to be the case. When attaching to 3rd party processes (like skype) sometimes they have threads that apparently die with uncaught exceptions, and you can't *not* catch them. Annoying! – rogerdpack Apr 24 '12 at 18:11
1

Ctrl+Alt+E (or Debug\Exceptions)

From there you can select which exceptions break.

Abhishek
  • 6,912
  • 14
  • 59
  • 85
Keith
  • 150,284
  • 78
  • 298
  • 434