如何获得非当前线程的堆栈跟踪? [英] How to get non-current thread's stacktrace?
本文介绍了如何获得非当前线程的堆栈跟踪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有可能得到使用System.Diagnostics.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.
推荐答案
根据 href="http://www.albahari.com/nutshell/"> C#3.0,这是为数不多的情况下,它可以调用挂起/恢复。
According to C# 3.0 in a Nutshell, this is one of the few situations where it is okay to call Suspend/Resume.
这篇关于如何获得非当前线程的堆栈跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文