How to: Switch to Another Thread While Debugging
This topic applies to:
Pro and Team
Does not apply
Command or commands hidden by default.
When you debug a multithreaded application, you will often want to switch context from the thread you have been working with to another thread. Visual Studio provides several ways for you to do this.
To switch to a thread in a source window
In the left gutter of the source window, right-click a thread indicator.
On the shortcut menu, point to Switch to, then click the name of a thread you want to activate.
Only the threads at that specific location appear on the shortcut menu.
To switch to a thread in the Threads window
Right-click any thread that appears in the Threads window.
In the shortcut menu, click Switch to Thread.
To switch to a thread in the Debug Location toolbar
In the Debug Location toolbar, click the Thread box.
A drop-down list appears that displays all threads or all flagged threads, depending on the current setting for the Thread list.
In the drop-down list, click the thread you want to switch to.
If you do not see the thread you want in the drop-down list, check the flag indicator next to the drop-down box. If the flag indicator is highlighted, the Thread list is set to show only flagged threads. Click on the flag indicator to toggle the display to show all threads. Then repeat steps 1 and 2.