views:

247

answers:

3

I'm trying to help debug a hang with the VS 2008 debugger. If I double click a thread in the Threads pane, I can see the trace for that thread in the Call Stack pane.

My question is: Is there a way to get all the call stacks for all the threads in one shot, without having to select each thread individually? I want to email the traces for all threads to the developer who is going to be investigating it.

A: 

There is no great way to do this with Visual Studio.

If you are able to use WinDbg though, you can use the following command to get the stack trace of all threads.

~* kn 500
JaredPar
I prefer !uniqstack since it only shows unique stacks. If you have a bunch of threads waiting for work, you will only see one instance of them.
LanceSc
+2  A: 

Much more useful for the developer of an application than text stack traces would be to save a minidump using Debug | Save Dump As (in Visual Studio) and send that instead.

sean e
+1  A: 

... although I found an easier way to do this outside of VS.

Managed Stack Explorer is exactly what I was looking for. It's a free and lightweight exe that hooks into a running app, and can give you a dump of all the stack traces in one place.

Tom E