Re: My UnhandledExceptionHandler Won't Fire
- From: "victorcamp" <victor.campbellnospam@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 15:36:12 -0500
I still have only a small understanding of the Visual Studio environment.
I tried just double-clicking the .exe, but that didn't fire it. The error that did come up then suggested turning on JIT in the config with <system.windows.forms jitDebugging="true" />, but there are lots of .config files to chose from. I chose devenv.exe.config, but that didn't change anything either.
I'm following through exercises in the Microsoft certification training book, and it says I should be able to raise it right there in the Visual Studio environment. I also tried the example exercises included with the book, and they didn't fire it either. Without the ability to see my own UnhandledExceptionHandler fire, I'm left with never using it in an app.
I would appreciate any help you can provide.
"Peter Bromberg [C# MVP]" <pbromberg@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:EDDAE980-F860-4C2A-B25F-33E2016F642D@xxxxxxxxxxxxxxxx
Victor,
This is most likely because you are doing your testing in the Visual Studio
IDE in debug mode, where the behavior is much different than when your
applicaition is running as a release - built app outside of the debugger
environment.
Hope that makes sense.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"victorcamp" wrote:
I'm new to Visual Studior C# .Net 2003 on Vista, and have been uable to get
my UnhandledExceptionHandler() to fire.
I have added these lines to Main() before the Application.Run():
AppDomain adCurrent = AppDomain.CurrentDomain;
adCurrent.UnhandledException += new
UnhandledExceptionEventHandler(UnhandledExceptionHandler);
It kicks out the regular debugging error, but never gets to my own event
handler. (I'm trying to learn exception handling, so I'm purposely not
handling the error at the moment.)
Is there a 'using' statement or a setting I should be using? There are no
compile errors.
.
- References:
- My UnhandledExceptionHandler Won't Fire
- From: victorcamp
- My UnhandledExceptionHandler Won't Fire
- Prev by Date: Re: Set DEBUG flag at runtime?
- Next by Date: Re: Creating an object from a wsdl definition?
- Previous by thread: My UnhandledExceptionHandler Won't Fire
- Next by thread: Re: My UnhandledExceptionHandler Won't Fire
- Index(es):
Relevant Pages
|