Exceptons when debugging

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?
 
M

Marc Vangrieken

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,
 
J

Jack Jackson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top