Debug mode: unending exception throw

K

kpax

Hi,

While debugging my application when an explicit exception is thrown by me
(or an implicit exception is thrown internally) which is not handled
anywhere in the stack,
the execution breaks as expected but I can not continue.
I try start the execution and go back to running mode, but it always comes
to the same line
where the exception is first thrown.

I read about the exceptions and tried to work with the exceptions dialog,
but no change.
It is really killing me, since when I get the exception I have to stop the
program and start it again.

Does any one have any idea how this can be overcome?

Thanks in advance...

Ipek
 
F

Frans Bouma [C# MVP]

kpax said:
Hi,

While debugging my application when an explicit exception is thrown
by me (or an implicit exception is thrown internally) which is not
handled anywhere in the stack,
the execution breaks as expected but I can not continue.
I try start the execution and go back to running mode, but it always
comes to the same line
where the exception is first thrown.

I read about the exceptions and tried to work with the exceptions
dialog, but no change.
It is really killing me, since when I get the exception I have to
stop the program and start it again.

Does any one have any idea how this can be overcome?

This is by design: if an exception isn't handled, the app stops.

The only way to get around this is by HANDLING the exception
somewhere. If you're debugging a winforms app, you can bind an
eventhandler to the Application.ThreadException event, and in hte
handler of that event, you can simply write it to the console, display
a popup window, or god forbid: swallow it. Though, when you handle it,
you can resume. If not handled, your app ends.

FB

--
 
R

Ralph Wheaton

I am experiencing the same problem. The issue isn't that the error is
unhandled, I do have a thread exception handler in my code. The problem is
that the debugger apparently doesn't recognize the handler and will not
allow the application to continue beyond the throw. If I run the
application from the exe outside the debugger, the throw goes to my thread
exception handler. Unfortunately, this puts a crimp on debugging the
application.

Ralph Wheaton
 

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