473,466 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2329
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:
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.