How can I catch unhandled exceptions from another process?

I want to modify or just load the .NET executable, and then handle its unhandled exceptions. My goal is to create an intelligent handler that can send stack traces.

+4
source share
2 answers

Assuming 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 an AppDomain.FirstChanceException Event .

+4
source

Failed to load the assembly into a separate application domain and subscribe to the unhandled exceptions of this application domain?

i.e. something like that

Is it possible to prevent unhandled exceptions in child applications to prevent the main process from crashing?

+4
source

All Articles