1

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.

tcb
  • 4,408
  • 5
  • 34
  • 51
  • http://stackoverflow.com/help/dont-ask *"If your motivation for asking the question is “I would like to participate in a discussion about ______”, then you should not be asking here"* ... *your answer is provided along with the question, and you expect more answers: “I use ______ for ______, what do you use?”* – J... Oct 11 '14 at 17:07
  • "Find in files" to slow? How many files are we talking about here? – Niall Oct 11 '14 at 17:32
  • there are around 200K files in all (code files, config files etc) – tcb Oct 11 '14 at 17:41
  • Have you considered splitting the code base into projects? Most searching is performed within a theme of source files. – Thomas Matthews Oct 11 '14 at 17:44
  • Look at Cygwin and the `etags` or `ctags`. Try `man ctags`. – Thomas Matthews Oct 11 '14 at 17:45
  • With that kind volume I think you are going to have to break it down into smaller projects/solutions along the codes own natural functional groupings. Look at the way in which the project is built, there will probably be some natural order to this. That is a lot of files. – Niall Oct 11 '14 at 17:57

3 Answers3

2

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.)

RichieHindle
  • 272,464
  • 47
  • 358
  • 399
0

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

Sergey Vlasov
  • 26,641
  • 3
  • 64
  • 66
  • Sando is good, but it only searches the currently open solution. As I mentioned, I cannot open all code files in a single vs solution. – tcb Oct 12 '14 at 05:11
0

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.

tcb
  • 4,408
  • 5
  • 34
  • 51