.netmultithreadingdebuggingstack-tracevisual-studio-debugging

How to get non-current thread's stacktrace?


It is possible to get stacktrace using System.Diagnostics.StackTrace, but thread has to be suspended. Suspend and Resume function are obsolete, so I expect that better way exists.


Solution

  • According to C# 3.0 in a Nutshell, this is one of the few situations where it is okay to call Suspend/Resume.