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 ???
    }
Mark Cidade
  • 98,437
  • 31
  • 224
  • 236
John
  • 63
  • 1
  • 3

1 Answers1

4

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.

Community
  • 1
  • 1
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • 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 Feb 18 '10 at 17:48
  • @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. – CodingWithSpike Feb 18 '10 at 18:00
  • 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 Feb 18 '10 at 18:16