How to use Mdbg.exe or ICorDebug to print stack traces of all running threads of a process programmatically

973 Views Asked by At

How can I use Mdbg.exe or ICorDebug to print stack traces of all running threads of a process programmatically in c#?

thanks.

2

There are 2 best solutions below

0
mkus On

I found the solution. I downloaded CLR Managed Debugger (mdbg) Sample 4.0 with source code. I changed some source code lines to use it according to my needs.

0
Wonko On

There is an example of this in the C# source for Red Flag's "Dump Stacks" functionality. http://redflagdebugger.codeplex.com/