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
- Press
Ctrl+Shift+F(Cmd+Shift+Fon Mac) to open Search. - Click the
.*button to turn on regular expressions, and theAbbutton to match case. - Search for:
\b(TODO|FIXME|HACK|BUG|XXX)\b - 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.
- Open the Command Palette (
Ctrl+Shift+P) and run Search Editor: New Search Editor. - Paste the same regex, turn on regex and match case.
- Click any result line to jump to it. Run the search again (
Ctrl+Shift+Rin the editor, or the re-run button) after you've changed code. - Save the tab as a
.code-searchfile 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:
- JavaScript and TypeScript (ESLint): add
"no-warning-comments": ["warn", {"terms": ["todo", "fixme", "hack"], "location": "start"}]to your ESLint config. - Python (Pylint): the
fixmecheck (W0511) is on by default. If you use Ruff, enable theFIXandTDrules. - Other languages: look for a "fixme", "todo" or "warning comments" rule in your linter.
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:
- Todo Tree: the best known. It runs ripgrep under the hood and hasn't been updated since 2023. Many of its open issues are ripgrep failures on recent VS Code versions, so check those before you rely on it.
- TODO Highlight: colours
TODO:andFIXME:in the editor and can list them, but matches the text anywhere, not just in comments. - Better Comments: colours comments by type. It doesn't give you a workspace list.
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.
If you're comparing it with Todo Tree in detail, see Todo Tree alternative.
Which one should you use?
| Search / search editor | Linter rule | Extension | |
|---|---|---|---|
| Setup | None | One config line | Install |
| Only real comments | No (regex can help) | Yes | Depends on the extension |
| Whole project | Yes | Usually open or linted files | Yes |
| Updates as you type | No, re-run it | Yes | Yes |
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.