views:

45

answers:

1

I've tried this, but it doesn't seem to work:

        Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
        Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
        AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

    static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
    {
        //suppress ???
    }

    static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
    {
        //suppress ???
    }
+3  A: 

Press Ctrl+D, E, and uncheck the exception that you don't want the debugger to break on.

EDIT: If the dialog doesn't work, ou can also do it by macro as described in these answers.

SLaks
Thats what I was going to do first, but somehow my Exception dialog is messed up and the "user unhandled" column is missing or is clipped and there's no scrollbar.
John
That's weird. Can you show a screenshot?
SLaks
@John, the "user unhandled" column will go away if you have the "Debugging | Just My Code" option unchecked in the main settings. If you turn "Just My Code" back on, then your "User Unhandled" column should show back up in the Exceptions window.
rally25rs
Before I read the above comment, I reset my Visual Studio settings profile and it came back. It reset the "Just My Code" option to checked, so I'm guessing that's why it came back. I never knew there was a connection. Thanks!
John