locked
managed threads dump RRS feed

  • Question

  •     Hello,
         I have to write a C# method that displays (dumps) information reagarding the current managed threads. Basically it has to look like the "Threads" window from VS Debugger.
    Now, so far i tried lots of things to get the running threads and i failed into listing the managed ones. If i managed to do that, there still is a problem: the location of the selected thread (like we see in the debugger window). I am beggining to think that is quite impossible to do this, unless i write my own debugger. 
        If anyone has any ideas on how to achieve my goal (even a different aproach), I will be forver indebted. 
        Thank you.
    Monday, September 29, 2008 4:05 PM

Answers

  • Using the CLR debugging interfaces seems like a good way to go. Are you looking at another process or your own?

    Mattias, C# MVP
    • Marked as answer by Harry Zhu Wednesday, October 1, 2008 6:56 AM
    Tuesday, September 30, 2008 6:53 AM
  • I mean the ICorDebug family of COM interfaces. There's a forum dedicated to question about them here. But I don't think it will help you here since you can't debug your own process.
    Mattias, C# MVP
    • Marked as answer by Harry Zhu Wednesday, October 1, 2008 6:56 AM
    Tuesday, September 30, 2008 7:17 AM

All replies

  • Using the CLR debugging interfaces seems like a good way to go. Are you looking at another process or your own?

    Mattias, C# MVP
    • Marked as answer by Harry Zhu Wednesday, October 1, 2008 6:56 AM
    Tuesday, September 30, 2008 6:53 AM
  • I want to use it within my process. What exactly do you mean by "CLR debugging interfaces" ? 
    Tuesday, September 30, 2008 7:01 AM
  • I mean the ICorDebug family of COM interfaces. There's a forum dedicated to question about them here. But I don't think it will help you here since you can't debug your own process.
    Mattias, C# MVP
    • Marked as answer by Harry Zhu Wednesday, October 1, 2008 6:56 AM
    Tuesday, September 30, 2008 7:17 AM
  • Wow, this is exactly what I need. Thank you.
    Tuesday, September 30, 2008 10:38 AM