c# - How to identify problem when program crashes without showing error? -
Please let me know when my app crashes and when "do not send"
thanks < / P>
thanks
thanks
thanks
<<< >>
For WinForms, you can add a thread exception handler just before the application. To catch the throw exception in the WinForms UI event handlers: / P>
application.ThreadException + = New Thread Expression Handler (Application_ThreadException);
But it is worth mentioning that it only allows you to log / report an exception - you can not stop the application from closing after this final handler exits. In addition, visual studios can also be configured, and external debuggers (such as managed SOS extensions) With WinDbg). To add useful logging to your app, use a logging framework like log-in and dump exception information before the application closes.
Comments
Post a Comment