1

I'm running into issues with VS Code's file search. I've tried restarting the app, reopening the workspace, etc, but the problem persists.

Simply put, the file search can't find exact matches for basic files like my package.json or tsconfig.json in the root directory. See the screenshots below.

It shows my package-lock, but not package.json. It cant find these files even when matched explicitly. I have only the standard exclusions on, none of which should effect these files. What could be happening?

This is even more frustrating considering that the "go to file" command (cmd+p on Mac) shows every file across all my directories. So a search for "package" returns every package.json I have. VScode search is practically unusable right now.

Does anyone have any tips or solutions? Is this an open issue?

enter image description here

enter image description here

starball
  • 20,030
  • 7
  • 43
  • 238
rolias4031
  • 233
  • 2
  • 10

1 Answers1

2

You're searching with the wrong part of the VS Code UI.

You're searching in the Search view (the one with the / icon), which searches for file contents.

To search for files by name, use the Explorer view (the one with the /) and press the find shortcut (ctrl+f on windows and linux, and cmd+f on MacOS) to open up the find widget.

starball
  • 20,030
  • 7
  • 43
  • 238