Someone asked me to get a call stack or stack trace of a running process so that he could analyze it for me.

How can I get that information?

up vote 32 down vote accepted
  1. Get Process Explorer.

  2. Enable Show Details for All Processes from the File menu:

    enter image description here

  3. In the main pane, select the process you're interested in:

    enter image description here

  4. Open the context menu (right-click) for the selected process and click Properties:

    enter image description here

  5. On the Threads tab, you'll be able to see a list of the running threads inside that process:

    enter image description here

  6. Select the thread you're interested in and click the Stack button:

    enter image description here

  7. Process Explorer will now display the current call stack for the selected thread:

    enter image description here

Symbols

If your troubleshooting requires you to get more detail, it is often very helpful to load debugging symbols into Process Explorer. This is how:

  1. If you don't already have a Windows debugger installed, you're going to have to install the Debugging Tools for Windows first.

  2. In Process Explorer, open Configure Symbols... from the Options menu:

    enter image description here

  3. If you have the Debugging Tools (or another Windows debugger) installed, Process Explorer will automatically find the dbghelp.dll file. Otherwise, set the correct path here.

    enter image description here

    The Symbols path should look something like:

    SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols
    

    The only part you'll want to adjust is C:\Symbols. That's the location where the debugging symbols will be cached.

  • is there a way to dump all threads call stacks to file? – bgura Jun 23 '17 at 14:00

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.