Discussion:
Exceptions & debugger question.
(too old to reply)
Da Jones
2009-06-17 18:12:45 UTC
Permalink
Hi, i have a couple of questions regarding Visual C++ Express.

Is it possible to get the debugger to break exactly where an exception
occurs instead of some way after it? Say for example a null ptr access or an
actual throw, it rarely stops near to where the actual exception happens, or
where the offending code is.

Also once an exception occurs it seems imposible to get the debugger to let
the exception continue unwinding up the stack and fall up to an enclosing
try..catch, or to abort the app. Retry just does nothing, just keeps the
debugger where it is, likewise ignore, break just stays at the breakpoint.
There aint nothing i can find to do to let the exception filter up the call
stack.
Alex Blekhman
2009-06-18 08:04:51 UTC
Permalink
Post by Da Jones
Is it possible to get the debugger to break exactly where an
exception occurs instead of some way after it?
Yes, it is possible. Go to menu Debug -> Exceptions..., pop up
dialog will open. There you'll see different categories for
exceptions that VC++ recognizes. You're interested in Win32
category. There you can fine tune which exceptions will trigger
debugger break.
Post by Da Jones
Also once an exception occurs it seems imposible to get the
debugger to let the exception continue unwinding up the stack
and fall up to an enclosing try..catch, or to abort the app.
Retry just does nothing, just keeps the debugger where it is,
likewise ignore, break just stays at the breakpoint.
I agree. This is annoying feature. However, if there is enclosing
try..catch somewhere up the stack, then debugger prompts for
continuation. VC++ debugger is stuck only if there is no handling
catch/__except clause.

Alex

Continue reading on narkive:
Loading...