how to quickly search file contents in visual studio for large codebases

1.8k views Asked by At

Visual studio has the ability to instantly Navigate To (ctrl + ,) any symbol that is part of the solution. However, I am working on a large c++ codebase where all code files cannot be opened in a single vs solution.

How to instantly search files through large codebases from visual studio?

Note: The built in find in files is too slow to be really useful.

3

There are 3 answers

1
Sergey Vlasov On

Sando Code Search Tool pre-indexes source code and promises near-instant search.

0
RichieHindle On

Entrian Source Search is a Visual Studio extension that does exactly what you're asking. It searches all the files in any set of directories you give it, not just the files in the solution. It builds a full-text index of the source, so searches are near-instant.

As an extreme example, my current project has in its index 18,314,927 lines of source code, totalling 645MB. Searching for a semicolon finds 5,760,878 hits in 6.9 seconds. Searching for anything with a sensible number of hits is instant.

(Full disclosure: it's a commercial product ($29) and I'm the author. I wrote it because I work with large codebases and found Find In Files to be inadequate.)

0
tcb On

I made Windows Search to index my entire codebase and used this vs extension to navigate to any text in my codebase. This has the added advantage of being able to search any string in a 'google search' sort of fashion.