Parallel Stacks is one of the debugging enhancements in VS 2010 IDE that helps in debugging parallel programming. When you press F5 for debugging Parallel Stacks and Parallel Tasks windows get enabled in debug mode only. As you know, when a break point is set Program will stop at the Break Point.
Debug Menu Item->Windows->Parallel Stacks
Parallel Stacks
The Parallel Stacks window demonstrates call stack information for all threads and Tasks.
There is a dropdown list in the upper left-hand corner to select either Thread View or Task view.
The below figure indicates parallel stacks in Tasks View .
The below described are the other options
Show Only Flagged
There is Flagged Icon in the toolbar to show only call stacks for flagged threads. Flagging of the threads can be done from parallel tasks window.
Toggle Method View
This help to toggle between Stack View and Method View.
AutoScroll to current Stack Frame
As the name suggests this feature helps to auto-scroll the diagram to the current stack frame.
Toggle Zoom Control
This feature is to show/hide the zoom control.
Right click on the current thread in call stack window and you can see the options as shown below
We can Go to Source Code directly from here using Go to SourceCode Option. The other options are Go to Disassembly, Show External Code, Hexadecimal Display, Symbol Load Information, and Symbol Settings. The two new items that we get in addition to these are “Switch to Frame” and “Go to Task”.
“Switch to Frame” - switches to the frame that gets called in Call Stack window, but in a parallel application, there are cases that multiple frames may correspond to one method context. In that case there will be sub-menu items for each stack frame.
“Go to Task”- switches to the Task view. We can also navigate the same using the dropdown list in the toolbar. But it keeps the stack frame that has clicked as highlighted.
