views:

427

answers:

3

I am trying to figure out what the browse information (.sbr files) is used for but find only references how to create it. So what is it for?

Thanks Dima

+2  A: 

At one time browse info drove the "Go to definition" engine, but that has been reworked in later version of Visual C++. Some third-party tools still use browse info (can't remember for sure, but I think one of Rational's tools does) to cross-reference code.

I always disable it, to shorten build times.

Kim Gräsman
Isn't it disabled by default?
Pavel Minaev
@Pavel: Could be that it is. I tend to run into it in legacy codebases where it has either been on by default in earlier VS versions, or people have enabled it as an attempt to improve IntelliSense.
Kim Gräsman
+2  A: 

.sbr is pretty much Visual Studio's ctags - an index of symbols with backreferences to the source. When available, it's used by "Find Symbol" and other similar tools. It's more accurate than the built-in VS parser, because C++ can be tricky, and the real compiler can do a better job (though that is not quite true in VS2010 anymore).

Pavel Minaev
+4  A: 

Read here (Visual C++ Team Blog: IntelliSense History, Part 1)

Capturing information about a C or C++ program’s structure has been around for a very long time in Microsoft’s products. Preceding even Visual C++ 1.0, the compiler supported generating program information through .SBR and .BSC files. (Note: The compiler in Visual C++ 1.0 was already version 8, so the command line tools had been around a while already.) The SBR files contain reference and definition information for a single translation unit that the compiler generates as it compiles. These SBR files are combined in a later step using the BSCMAKE tool to generate a BSC file. This file can then be used to look at many different aspects of a program: reference, definitions, caller-callee graphs, macros, etc.

Shay Erlichmen
Great article!!! So if I use Visual Assist can I turn off "browse information" (the code base is pretty big - more than 1M LOC)?
dimba
I turn this off always, even without Visual Assist.
Shay Erlichmen