我如何能赶上另一个进程的未处理的异常? [英] How can I catch the unhandled exceptions of another process?

查看:81
本文介绍了我如何能赶上另一个进程的未处理的异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要修改或只需加载.NET可执行文件,然后处理其未处理的异常。 我的目标是做一个聪明的处理程序,可以发送堆栈跟踪。

I want to modify or just load a .NET executable and then handle its unhandled exceptions. My goal is to make a smart handler which can send the stack traces.

推荐答案

假定其他可执行文件是一个.NET应用程序,将其加载到一个新的 的AppDomain 并运行它。当目标可执行抛出一个异常,你会得到 AppDomain.FirstChanceException事件

Assuming that the other executable is a .NET application, load it into a new AppDomain and run it there. When the target executable throws an exception, you get AppDomain.FirstChanceException Event.

这篇关于我如何能赶上另一个进程的未处理的异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆