Search code examples
c#exceptiondebuggingsuppressnotimplementedexception

How can keep the debugger from breaking on NotImplementedException exception?


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 ???
    }

Solution

  • 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.