我已经尝试这样做,但它似乎不到工作:

        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 ???
    }
有帮助吗?

解决方案

按Ctrl+D,E,并取消除你不想要调试器,以打破。

编辑:如果对话不能工作,ou还可以通过宏观描述 这些问题的答案.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top