I have a global exception handler hooked up to Application.ThreadingException and this works fine when the application is not being debugged.
I have noticed several times that in debug my application closes without warning and without the debugger stopping on the error. I have thought this might be connected to my Global Exception Handler but it is not.
I appear to be getting more an more cases on errors that are caught by the GEH that result in the app closing while in debug mode. I have no idea why this is happening but it is very annoying as the only way to debug this is to work out somewhere in the code to put a breakpoint and single step until the crash.
Is it possible I turned some option off in VS2010? Any help and guidance would be most appreciated.
EDIT I can confirm that I have CLR Exceptions checked As Break on Exception when User Unhandled
You need to set the UnhandledExceptionMode of your Application to CatchException so your global exception handler will always be notified about exceptions.