简体   繁体   中英

How can I catch the unhandled exceptions of another process?

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.

Could you load an assembly into a seperate app domain and then subscribe to the unhandled exceptions of that app domain?

ie something like this

Can Unhandled Exceptions in Child AppDomains be prevented from crashing the main process?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM