Myzles › Guides

How to list all TODOs in VS Code

Todoscope works in VS Code, Cursor, Windsurf and VSCodium. VS Code Marketplace · Open VSX (Cursor, Windsurf, VSCodium).

VS Code has no built-in TODO list. You can still get one in under a minute with plain search, and if you want a list that stays up to date while you work, a linter rule or an extension does it for you. Here are four ways, from zero setup to most automatic.

1. Search the whole workspace with a regex

  1. Press Ctrl+Shift+F (Cmd+Shift+F on Mac) to open Search.
  2. Click the .* button to turn on regular expressions, and the Ab button to match case.
  3. Search for:
    \b(TODO|FIXME|HACK|BUG|XXX)\b
  4. Click the three dots under the search box and set files to exclude to something like node_modules, dist, build, *.min.js. By default VS Code already skips files in your .gitignore.

Matching case matters. Without it you'll get every variable called todoList and every string with "Bug" in it. Even with it, you'll see hits in strings and constants (status = "TODO"), because search doesn't know what's a comment.

To only catch tags at the start of a comment, tighten the pattern. For languages with // and # comments:

(//|#|/\*|\*)\s*(TODO|FIXME|HACK|BUG|XXX)\b

2. Keep the results open in a search editor

The Search side panel gets replaced every time you search for something else. A search editor gives you the list as a normal tab.

  1. Open the Command Palette (Ctrl+Shift+P) and run Search Editor: New Search Editor.
  2. Paste the same regex, turn on regex and match case.
  3. Click any result line to jump to it. Run the search again (Ctrl+Shift+R in the editor, or the re-run button) after you've changed code.
  4. Save the tab as a .code-search file if you want to reopen the same search later.

From a terminal, git grep does the same and is handy in scripts:

git grep -n -E "\b(TODO|FIXME|HACK|BUG|XXX)\b"

3. Put TODOs in the Problems panel with your linter

The Problems panel (Ctrl+Shift+M) only shows what a language server or linter reports. Most linters can report TODO comments if you turn the rule on:

This is the cleanest built-in option because the linter knows what a comment is. The catch: the Problems panel mixes TODOs in with real warnings, and it usually only covers files the linter has looked at, not the whole project.

4. Use a TODO extension

An extension scans the whole workspace and keeps a tree of every tag, grouped by file, that updates as you type. The common ones:

The tool I built

I got tired of Todo Tree breaking whenever its ripgrep went missing, so I made Todoscope. It has its own scanner that only counts tags inside real comments, gives you the tree, highlights and filters for free, and can import your Todo Tree settings. Pro adds reports, git blame age and TODOs added on a branch.

On 95 public repos I hand-checked 45 lines that Todo Tree's default search missed and Todoscope found: 43 of them were real TODOs.

Install Todoscope free

If you're comparing it with Todo Tree in detail, see Todo Tree alternative.

Which one should you use?

Search / search editorLinter ruleExtension
SetupNoneOne config lineInstall
Only real commentsNo (regex can help)YesDepends on the extension
Whole projectYesUsually open or linted filesYes
Updates as you typeNo, re-run itYesYes

FAQ

How do I search for TODO in all files in VS Code?

Press Ctrl+Shift+F, turn on regex and match case, and search for \b(TODO|FIXME)\b. Results cover every file in the workspace that isn't excluded or gitignored.

Does VS Code have a built-in TODO list?

No. You need workspace search, a linter rule that reports TODO comments in the Problems panel, or an extension.

Why does Todo Tree say ripgrep not found?

Todo Tree calls the ripgrep binary that ships inside VS Code. When VS Code moves or renames it, Todo Tree can't find it. Setting todo-tree.ripgrep.ripgrep to a ripgrep you installed yourself is the usual workaround.

How do I exclude node_modules from a TODO search?

In the Search panel, open the three-dot menu and add node_modules to files to exclude. Files in .gitignore are skipped by default.