I have a .NET program with an event handler bound to Application.CurrentDomain.UnhandledException. When running the program with debugging, this event fires when an unhandled exception is thrown. However, when running without debugging, the event does not fire.
What is my problem?
Thanks, Andrew
Maybe the exception is thrown within a separate thread in your application. We've seen the problem of an application just "stopping" (means: one second it's there, the other second it's gone) when an unhandled exception occurs within a thread. In that case, not even the unhandled exception handler got triggered.
I assume you have not set the correct exception handling mode using
Application.SetUnhandledExceptionMode()
- just set it toUnhandledExceptionMode.ThrowException
.UPDATE
I just wrote a small test application and found nothing to work unexscpected. Could you try to reproduce your error with this test code?