Search code examples
visual-studio-codevscode-snippets

While searching in VS code, how to avoid unnecessary folders and files like obj/debug and get the project related files only


enter image description here While searching in VS Code, I want to search and get the files in my project. instead of that, its showing a lot of files, which is irrelevant. Example: if I search "main," I expect to see things like mainpage.xaml, mainpage.xaml.cs, and mainactivity. but it's showing a lot of unnecessary data. how to avoid this. Before this, I had used Visual Studio, and I had not faced this problem. And can we do it for entire VS code instead of one project.


Solution

  • If you create a git repo and configure your .gitignore to ignore those files / directories then they won't show up in the search.

    Hope this helps :)