3rd attempt: Exception in Timer.Tick/JIT debugging

  • Thread starter Thread starter Armin Zingler
  • Start date Start date
A

Armin Zingler

Hi,

as nobdoy answered again, again the short version:

1. Add a Timer (System.Windows.Forms.Timer) to a new WindowsApplication.
2. Set the timer's Enabled property = True.
3. In the timer's tick event, write:
Throw New Exception
4. Start

How can I have the IDE handle the exception? That's what I expect but I
don't have a chance.


Armin
 
Tim Mackey said:
hi Armin,
i can't reproduce your situation. my app shows the normal unhandled
exception dialog box.


This is not the IDE. This is the "JIT debugging" dialog, as you can see
here:
http://people.freenet.de/armin.zingler/jitdebugging.PNG
(buttons mean details, continue, quit.)
I want the *IDE* to handle the exception like everywhere else. It does *not*
handle the exception if it occurs in a timer's tick event.

If I throw the exception in a button's click event instead, the IDE dialog
occurs:
http://people.freenet.de/armin.zingler/ide.png
I can press the first button (means "break") and the cursor is on the line
throwing the exception. That's how I expect it to be. This is not possible
with the 1st dialog.
are you sure you created the form on the UI thread?

My example shows how I did it. That's all. There are no other threads.

I read the rest of your post but that's currently not the point.


If my example runs without a debugger attached, I also get the 1st dialog,
if the exception is in the timer tick event wherease I get the usual dialog
if it's anywhere else (like in a button's click event):
http://people.freenet.de/armin.zingler/exceptionnodebugger.png

I don't understand this dictinction made.

Armin
 
Back
Top