How to get stack trace of a running process from a Visual Studio add-in?

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2010-06-01T23:34:20Z Indexed on 2010/06/02 3:23 UTC
Read the original article Hit count: 386

Filed under:
|
|
|
|

I am writing a Visual Studio add-in in C# and I need access to the currently running process' stack trace. I tried putting this code into my add-in but it returns the add-in's stack trace, not the process I am debugging.

System.Diagnostics.StackTrace stacktrace = new System.Diagnostics.StackTrace(true); System.Diagnostics.StackFrame stackframe = stacktrace.GetFrame(0);

Any help would be appreciated.

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio