Multi-thread debugging facilities in Visual Studio 2008
Visual Studio 2008 provides some smart features for debugging multi-threaded programs. Let’s take a look to few features
Flag
You can flag interesting threads from the list
Category
Provides type of a thread, like worker thread or Main thread.
Name
This is one of the coolest feature. You can name a thread. It’s gives flexible way to identify the threads in a readable way. As you see in the first picture, you can give any crappy name for your threads
Location
Provides information on the thread start function. When the mouse is over the location, it also shows up the current stack frame of the particular thread where the mouse belongs.
Switch To Thread
You can switch to any running thread within the application using “Switch To Thread” feature. The acitve thread will be marked with a yellow arrow as you see in the first figure.
Show Thread In Source
This feature provides gives an indicator on which are the source statements are currently being executed by different threads. In a single point, there could be multiple threads. By hovering the mouse over this location, you can see the current threads which executes the particular line. In the picture below, you can see multiple squiggly marks. Again, these are the lines currently dealt with different threads. You can also see the tool tip which gives information on multiple threads executing the particular statement.
Suspend
The thread Debug window also provides the suspend count of the threads running in the system
Debug Location Bar
This bar provides more information on the current debug location of multiple threads. You can choose a running thread from the “Thread” combo box. If you check the “Stack Frame”, you can see the call stack of the particular thread selected. On selecting a thread, it acts as “Switch To Thread” as I described above.
Next Statement Location
Finally it shows, a green indicator which indicates the next statement when the thread returns from the current function being executed.

about 1 year ago
If you do a lot of multi-thread debugging, you might find Allinea’s DDTLite useful. It’s a parallel debugging add-in for Visual Studio 2008 with group/individual thread control, lock-stepping, cross-thread expression evaluation and so on. You can download a trial from http://www.allinea.com/ddtlite – we’d be interested to hear how you get on!
about 1 year ago
Hello. It is test.
about 1 year ago
I am here at a forum newcomer. Until I read and deal with the forum.
Let’s learn!