Share via


How to: Flag and Unflag Threads

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not apply Topic does not apply Topic applies Topic does not apply

Standard

Topic applies Topic applies Topic applies Topic applies

Pro and Team

Topic applies Topic applies Topic applies Topic applies

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

In Visual Studio 2008, you can flag threads that you want to give special attention. Flagging a thread marks it with a flag icon in the Threads window, so that flagged threads can be easily distinguished from other threads.

Flagged threads also receive special treatment in the Thread list on the Debug Location toolbar. The Thread list can be set to show all threads or only flagged threads. When you flag a thread, the Thread list automatically switches to show only flagged threads. You can switch it back to show all threads when you need to.

To flag a thread in the Threads window

  • In the Threads window, right-click the thread you want to flag and click Flag.

    If the thread is already flagged, the Flag option does not appear.

    —or—

    Click the disabled flag icon in the leftmost column of the Threads window.

To unflag a thread in the Threads window

  • In the Threads window, right-click on the thread you want to unflag and click Unflag.

    If the thread is not flagged, the Unflag option does not appear.

    —or—

    Click in the enabled flag icon in the leftmost column of the Threads window.

To flag a thread in a source window

  1. In the left gutter of the source window, right-click the thread marker (a pair of wavy lines that resemble two cloth threads).

  2. Point to Flag, then click the name of the thread you want to flag.

    If there are no threads that can be flagged at the selected location, the Flag menu option does not appear.

To unflag a thread in a source window

  1. In the left gutter of the source window, right-click the thread marker (a pair of wavy lines that resemble two cloth threads).

  2. Point to Unflag, then click the name of the thread you want to unflag.

    If there are no threads that can be unflagged at the selected location, the Unflag menu option does not appear.

To unflag all threads

  • In the Threads window, right-click any thread and select Unflag All Threads.

See Also

Tasks

Walkthrough: Debugging a Multithreaded Application

Other Resources

Debugging Multithreaded Applications