Application.ThreadException doesn't catch in IDE



Very strange problem that is only ocurring in one application (that is, I
can create a brand new app and not experience this problem).

I have created a handler for Application.ThreadException, in my case in C#
that simply displays the unhandled exception.

If I choose "Debug" in the VS.NET 2003 IDE, exceptions never go into the
handler so the application, of course, terminates. If I then immediately go
into the bin/Debug folder and then run the exact same .exe by
double-clicking, the handler is used. Stranger still, once the app is
running after double-clicking on it, I can attach the debugger and the
handler continues to work.

What am I missing?
James


.



Relevant Pages

  • Re: Exceptions Thrown in Background Threads
    ... The only time where it is not practical is when the exception actually ... ought not to be in a UE handler. ... One of the fields in the unhandled exception ... app immediately thereafter - the app has no control over this. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Logging (exceptions etc)
    ... So basically I'm thinking I need to include a UE handler as a last resort, ... I've become annoyed with the add-in dying (and taking the main app with it) ... > exception to be unhandled, especially if you are writing an add-in. ... > unhandled exception event will be sent and the exception will be ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Batch file and MFC (Properly Terminating Application)
    ... running any secondary modal loop. ... don't write an OnCancel handler, ... the changes the user thought had been made--because the app closed without ... user clicks on Cancel button and application exits. ...
    (microsoft.public.vc.mfc)
  • Re: Losing data in controls (and arrays) during unhandled exceptions.
    ... Errors will "bubble up" through the routines until an active error handler ... So if the first routine has a handler, you can deal with it there. ... I guess having to hit the 'Reset' button should have been ... worksheet when the app is shut down, ...
    (microsoft.public.excel.programming)
  • Re: Thread Deadlock
    ... How can an app update ... > does not get out of the event handler until the dialog is closed. ... Every window has a function that gets called when a message needs to be ... This function is called from a Message Pump. ...
    (microsoft.public.vc.mfc)