473,326 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Debug mode: unending exception throw

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
Nov 17 '05 #1
2 2313
kpax wrote:
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

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #2
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
"Frans Bouma [C# MVP]" <pe******************@xs4all.nl> wrote in message
news:xn***************@news.microsoft.com...
kpax wrote:
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

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Microsoft | last post by:
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...
5
by: Tym | last post by:
Being new to dotnet from VB6 could someone please explain the difference between the degun build and release build of the "deployed" program? Does this mean that the debug comment can be logged...
2
by: Doug Belkofer | last post by:
We have created a fairly complex mixed-mode DLL that we want to use from VB.NET. The mixed-mode DLL is written in C++, and does use the standard C runtime libraries. An unusual thing is happening...
22
by: semedao | last post by:
Hi , I am using asyc sockets p2p connection between 2 clients. when I debug step by step the both sides , i'ts work ok. when I run it , in somepoint (same location in the code) when I want to...
0
by: tavita | last post by:
Hi all, This is my code: try { connection = new SqlConnection(connectionString); connection.Open(); } catch {
7
by: =?Utf-8?B?R3JpZ3M=?= | last post by:
Hello, After getting some posts on forums.microsoft.com but no solution I was asked to post over here. Hopefully someone here can help with my problem. I have a Windows Forms application...
5
by: blackjack2150 | last post by:
Hi. This one is really strange and annoying. The main method of a Windows Application: static void Main(string args) { Application.EnableVisualStyles();...
3
by: Bob Johnson | last post by:
It is my understanding - and please correct me if I'm wrong - that when building a project in debug mode, I can deploy the .pdb file along with the ..exe and thereby have access to the specific...
0
by: =?Utf-8?B?SmVmLnB0Yw==?= | last post by:
Hi, I am currently facing exactly the same issue with Visual Studio 2005. Did you find a way to solve this problem ? "AntonioSACE" wrote:
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.