Search code examples
visual-studio-code

How can I see "problems" in VS Code code for all files- not just the ones opened


Pressing ctrl-shift-m in VS Code you can open the "problem" tabs, which display all the problems found for all the open files.

enter image description here

is there some way (plugin perhaps?) to see problems for all files in the project/or in some folder and below, so I don't have to open each file?


Solution

  • I'm not aware of there being a extension-agnostic solution to this. My understanding is that problem contribution behaviour is up to the contributing extension. Pretty sure the related API things are under the name "diagnostic". Ex. see the Diagnostic type and the "Provide Diagnostics" extension development docs.

    You can consult your extension's documentation or filter the settings it contributes to see if it provides a setting to configure this behaviour, such as the builtin TypeScript extension has (see How to make Visual Studio Code check entire project for errors?). If there is no such setting, you can go ask the maintainers of the extension of interest about it. If you do, first search their issue tracker first to see if it's already been raised before (Ex. for cSpell, see How to run VSCode Code Spell Checker extension on an entire folder?/).

    Or you can ask a question here on SO about a specific extension. Again, make sure to search first. There might already be one for the extension you're interested in, such as the TypeScript and cSpell ones I linked above.