Using the Task List

Use the Task List to create and manage tasks, add and track code comments that use tokens such as TODO and HACK, and manage shortcuts that will take you directly to a predefined location in the code.

In this topic:

The Task List window

When the Task List is open, you can choose to display user tasks, comments, or shortcuts. The Task List window appears at the bottom of the application window.

To open the Task List

  • On the View menu, choose Task List (Keyboard: Ctrl+\,T).

    Visual Studio IDE - Task List window

To display user tasks, comments, or shortcuts

  • Open the Categories drop-down list, and then choose User Tasks, Comments, or Shortcuts.

    Visual Studio - Task List - Categories

Note

The options will change based on the programming language you are using and whether or not there are shortcuts set in your code.

You can also customize how the content is displayed by changing the sort order the list, showing or hiding columns, or changing the order in which the columns appear.

To change the sort order of the list

  • Click the header of any column. To further refine your search results, press Shift and click a second column header.

    As an alternative, on the shortcut menu, choose Sort by, and choose a header. To further refine your search results, press Shift and choose a second header.

    Visual Studio - Task List - Sort By

To show or hide columns

  • On the shortcut menu, choose Show Columns. Choose the columns that you want to show or hide.

To change the order of the columns

  • Drag any column header to the location that you want.

User tasks

User tasks are reminders about work that you want to do or issues that you want to address. You can create user tasks, mark them as complete, and then delete them when they are no longer needed.

To create a new user task

  1. With User Tasks selected in the Category drop-down list, choose the Create User Task button Create User Task icon - Visual Studio in the upper-right corner of the Task List window.

    Visual Studio - Task List - Create User Task

  2. Type a description of your user task, and then press Enter.

To change the priority of a user task

  • Click in the Priority column to the left of a task, and then select a new priority setting.

    Visual Studio - Task List - Priority

To mark a user task as complete

  • Select the check box to the left of a user task.

To remove a user task from the list

  • Choose a user task. On the shortcut menu, choose Delete.

Tokens and comments

A comment in your code preceded by a comment marker and a predefined token will also appear in the Task List window. For example, the following C# comment has three distinct parts:

  • The comment marker (//)

  • The token (TODO)

  • The comment (the rest of the text)

//TODO: Load state from previously suspended application

Because TODO is a predefined token, when you choose to display Comments in the Task List, this comment also appears as a TODO task in the list.

To create a new comment

  • In the code, type the comment marker for your code (for example, type // for C# code), a token such as TODO, HACK, or UNDONE, and then complete the comment.

Tip

After you have created the comment, you can double-click the comment in the Task List window to locate it in the corresponding code.

As an alternative, to navigate through the comments in the code, choose a user task in the list, then choose Next Task or Previous Task from the shortcut menu.

Custom tokens

By default, Visual Studio includes the following tokens:

  • HACK   Indicates a workaround.

  • TODO   Indicates something to be done.

  • UNDONE   Indicates a reversal or "roll back" of previously changed or updated code.

You can also create your own custom tokens.

To create a custom token

  1. On the Tools menu, choose Options.

  2. Open the Environment folder and then choose Task List.

    The Task List, Environment, Options Dialog Box is displayed.

  3. In the Tokens category, in the Name text box, enter your token name.

  4. In the Priority drop-down list, choose a default priority for the new token. Choose the Add button.

C++ TODO comments

By default, C++ TODO comments are not displayed in the Task List window.

To display C++ TODO comments

  1. On the Tools menu, choose Options.

  2. In the Options dialog box, open Text Editor.

  3. Under C/C++, choose View, and then set Enumerate Comment Tasks to True.

Shortcuts

A shortcut is a bookmark in the code. Double-click the shortcut in the Task List to go to the corresponding location in the code.

To create a shortcut

  • Insert the pointer into the code where you want to place a shortcut. On the Edit menu, choose Bookmarks, and then choose Add Task List Shortcut (Keyboard: Ctrl+K, Ctrl+H).

    As an alternative, to navigate through the shortcuts in the code, choose a shortcut in the list, and then choose Next Task or Previous Task from the shortcut menu.

See Also

Reference

Task List, Environment, Options Dialog Box