By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,641 Members | 1,446 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,641 IT Pros & Developers. It's quick & easy.

Debugging

P: n/a
When I run my project in Debug mode and I get an unhandled exception, I get
a window that says "An unhandled exception has occurred in your
application..." with Continue and Quit buttons. I would like for Visual
Studio to break on the line of code that caused the exception.

I have

<system.windows.forms jitDebugging="true" />

in my machine.config file and there is no application.config file.

Under the Debug -> Exception menu in Visual Studio, I have "If the exception
is not handled" set to "Break into the debugger" for all 4 exception types
listed.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Mike,

You can set by right clicking a breakpoint or just the word Stop, what is a
little bit dangerous when you forget that.

I hope I understood you well and this helps?

Cor

"Mike W" <mi*******@nospam.msn.com>
When I run my project in Debug mode and I get an unhandled exception, I
get a window that says "An unhandled exception has occurred in your
application..." with Continue and Quit buttons. I would like for Visual
Studio to break on the line of code that caused the exception.

I have

<system.windows.forms jitDebugging="true" />

in my machine.config file and there is no application.config file.

Under the Debug -> Exception menu in Visual Studio, I have "If the
exception is not handled" set to "Break into the debugger" for all 4
exception types listed.

Nov 21 '05 #2

P: n/a
That's true, if I knew ahead of time that a line of code would be causing an
exception, then I could put a breakpoint on that line, but I would probably
change the code so that it doesn't cause an exception.

Anyway, I want Visual Studio to break on ANY line of code that causes an
exception. I have seen it do this before, so I know it is possible. Can
anyone help with this??
"Cor Ligthert" <no************@planet.nl> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
Mike,

You can set by right clicking a breakpoint or just the word Stop, what is
a little bit dangerous when you forget that.

I hope I understood you well and this helps?

Cor

Nov 21 '05 #3

P: n/a
Mike,

It is not impossible that the error apears in a part where is
<System.Diagnostics.DebuggerStepThrough()>

What is by instance in the designer part.

As well it can become because of an endless loop, than you don't know were
it is. This will happen in recursief methods by instance.

However just some guesses.

Cor


"Mike W" <mi*******@nospam.msn.com> schreef in bericht
news:uG**************@TK2MSFTNGP15.phx.gbl...
That's true, if I knew ahead of time that a line of code would be causing
an exception, then I could put a breakpoint on that line, but I would
probably change the code so that it doesn't cause an exception.

Anyway, I want Visual Studio to break on ANY line of code that causes an
exception. I have seen it do this before, so I know it is possible. Can
anyone help with this??
"Cor Ligthert" <no************@planet.nl> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
Mike,

You can set by right clicking a breakpoint or just the word Stop, what is
a little bit dangerous when you forget that.

I hope I understood you well and this helps?

Cor


Nov 21 '05 #4

P: n/a
Mike,
Under the Debug -> Exception menu in Visual Studio, I have "If the
exception is not handled" set to "Break into the debugger" for all 4
exception types listed. Did you try changing the "Debug - Exception - When the exception is thrown"
to "Break into the debugger" also?

As the dialog that you show (in your later post) is the one that Windows
Forms shows when you do not handle the Application.ThreadException event. In
other words Windows Forms is handling the exception for you, ergo it is not
a unhandled exception per se...

Hope this helps
Jay

"Mike W" <mi*******@nospam.msn.com> wrote in message
news:uy****************@TK2MSFTNGP09.phx.gbl... When I run my project in Debug mode and I get an unhandled exception, I
get a window that says "An unhandled exception has occurred in your
application..." with Continue and Quit buttons. I would like for Visual
Studio to break on the line of code that caused the exception.

I have

<system.windows.forms jitDebugging="true" />

in my machine.config file and there is no application.config file.

Under the Debug -> Exception menu in Visual Studio, I have "If the
exception is not handled" set to "Break into the debugger" for all 4
exception types listed.

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.