Exceptons when debugging

  • Thread starter Thread starter Jack Jackson
  • Start date Start date
J

Jack Jackson

My VB 2005 winforms application has an Application.ThreadException
handler to catch any unhandled exception.

When debugging, the debugger doesn't stop when I get an exception,
control passes to my application exception handler. Currently I
comment out the handler to be able to get the debugger to stop when an
unhandled exception occurs.

Ideally I would like to have the debugger stop when any exception
occurs, then optionally be able to proceed by having the exception
bubble up. Is this possible?
 
Hi,

You can make VS2005 break when an exception is thrown. This can be
done via the Debug -> Exceptions.... menu item.

This doesn't change the program flow however, exceptions handlers
(catch and finaly clauses) will still be executed. You can't
automatically have the equivalent of "commenting out the handler".

Mvg,
 
I don't want to "comment out the handler", I just do that now because
it is the only way I can get control in the debugger when an exception
occurs.

I did not know there was an Exceptions item available for the Debug
menu - it was not present in my VS. By adding it, and poking around
in the Help, I managed to get this to work.

Thank you
 
Back
Top