How can I enumerate all managed threads in C#?

前端 未结 3 1389
遇见更好的自我
遇见更好的自我 2020-12-01 17:57

Is it possible to enumerate all managed threads in C#? Visual Studio seems to be able to do this when you hit a break point while debugging. In the \"Threads\" window it sho

3条回答
  •  执笔经年
    2020-12-01 18:49

    Take a look at Managed Stack Explorer:

    MSE works by quickly attaching to a process when a stack trace is requested and the detaching the second the stack trace has been retrieved. This way the interference in the normal operation of the process is minimized.

    Unfortunately, this means it has to done by an external process.

    A similar tool is StackDump, which uses MDbg to generate the dump.

提交回复
热议问题