ReSharper 2017.2 Help

Using To-do Lists

ReSharper | Windows | To-do Explorer
Ctrl+Alt+.
ReSharper_ShowTodoExplorer

ReSharper provides an easy way to track tasks and technical debt in your code — code items (comments, string literals, or identifiers) matching a specific pattern can be easily located in the whole solution using the To-do Explorer window.

To-do items are highlighted in the editor and on the marker bar according to their types (Edit, Normal, Question, Warning, Error). Colors are configurable on the Environment | Fonts and Colors page of Visual Studio options:

Configuring editor and marker bar colors for ReSharper's To-do items

To-do patterns

By default, ReSharper provides three predefined patterns for commonly used To-do items of the following types:

  • A comment containing TODO - Normal
  • A comment containing BUG - Error
  • A NotImplementedException in the code - Edit

You can also define your own patterns, so that you could quickly access your specific technical debt items in the To-do Explorer window.

To define a custom To-do pattern

  1. Open the Tools | To-do Explorer page of ReSharper options.
  2. Click Add on the toolbar.
  3. Provide a title for your To-do pattern and specify a regular expression with keywords that you want to detect in comments. For example, (\W|^)(?<TAG>Refactor)(\W|$)(.*).
  4. Select where ReSharper should apply the expression to find the To-do items (comments, strings, and/or identifiers).
  5. Optionally, specify whether the pattern is case sensitive.
  6. Select a type for the pattern to define how matched items will be colored in the editor and in the To-do Explorer window.
  7. Click OK to add this pattern to the list.
  8. You can also duplicate, edit or remove existing patterns.
  9. Click Save to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer using the Save To drop-down list. For more information, see managing and sharing resharper settings.

To navigate between To-do items in the current file, use To-do marks on the marker bar.

To study To-do items in the whole solution

  1. Press Ctrl+Alt+. or choose ReSharper | Windows | To-do Explorer in the main menu.
  2. To study the source code of the selected item right in the window, click Show Preview ThemedIcon PreviewToggle Screen Gray on the toolbar. If necessary, you can locate the preview pane on the bottom of on the right.
  3. In the To-do Explorer window that opens, click ThemedIcon Down Screen Gray or ThemedIcon Up Screen Gray to navigate to the next or previous item. To locate To-do items in the editor, double-click on them.
    Viewing To-do items with ReSharper

Filtering To-do items

Depending on the size and age of the codebase, there may be lots of To-do items. To concentrate on specific items, you can filter To-do items by pattern — just choose the desired pattern in the Filter selector to display items matching this pattern and hide all others.

This feature is supported in the following languages and technologies:

Language: C#
Language: VB.NET
Language: C++
Language: HTML
Language: ASP.NET
Language: Razor
Language: JavaScript
Language: TypeScript
Language: CSS
Language: XML
Language: XAML
Language: Resx
Language: Build Scripts
Language: Protobuf
Language: JSON
Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is not available

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.

Last modified: 10 November 2017

See Also