I would like Vis开发者_如何学Pythonual Studio not to enter the Debug mode when it picks up a specific exception I define (i.e. BusinessException is this case). This is because I have a specific global error handler that will then present this to the user.
Is there a way to avoid the VS debug pickup for this exception (so I'll go straight to seeing my exception handler dialog) but for other exceptions to still be handed by the VS debugging.
I'm using VS2008 for a C# project (winforms).
thanks
EDIT: Further clarification - currently I see (a) VS pick them up and show them in the debugger, and after I hit continue I see (b) them in my custom exception handler. What I want to do is disable step (a) for certain types of exceptions. I know that I can disable totally in VS by going to the settings and uncheck "Enable just my code", however that's not quite what I want.
May be you can try DEBUG Preprocessor http://www.csharphelp.com/2005/12/c-languages-preprocessor-directives/
精彩评论