Allen
Allen

Reputation: 3374

How to see list of project files in vscode

I have a vscode project that I know has too many files in it. When I do searches the system is grinding away to search through many many files and I get the little warning in the status bar once in a while suggesting to add files to files.exclude. The problem is, I don't know where the extra files are coming from. My guess is that somewhere I have overlooked some temp files or data directories, but I can't find them in the folder view. (I am sure they are there, but manually searching I don't see them)

So my question is, does vscode have a way to see a list or ask for a list of all files that are considered part of the project so I can track down where the ones I don't need are?

Upvotes: 0

Views: 2206

Answers (1)

Dan Caddigan
Dan Caddigan

Reputation: 1598

Things that would slow your search down are:

  1. Unnecessarily tracked folders with lots of files in them (dist, vendor, etc...)
  2. Huge files

For #1, you could do a generic search and see if weird folders are showing up in the search results. Add them to files.exclude in settings and then re-search.

For #2, open up the embedded terminal and run the command find ./ -size +5000 -print. This will find all files > 5Mb. For anything that doesn't need to be searched, add the file (or whole folder) to the blocklist.

See also: https://stackoverflow.com/a/40613250/1169948.

Upvotes: 2

Related Questions