Debugging a parallel application
Visual Studio provides several windows for parallel debugging. While the Threads window excels for any type of multithreaded application, other windows provide additional features and views when working with Task
objects in our applications.
We will start our tour of these features with the Parallel Stacks window.
Using the Parallel Stacks window
The Parallel Stacks window provides a visual representation of the threads or tasks in the application. These are two distinct views in the window. You can switch between them by selecting Threads or Tasks in the View dropdown box. The following screenshot shows an example of the Threads view while debugging the BackgroundPingConsoleApp project:
Figure 10.10 – Viewing the Parallel Stacks window in the Threads view
The Parallel Stacks window contains a toolbar with the following items from left to right. You can follow along by examining the tooltips for the toolbar items...