gpuguy
gpuguy

Reputation: 4585

In MSVS what are symbols and why it is required to be cached?

In MSVS 2010 if you go to Tools->Options->Debuggibg, the following window opens.

I want to know what are these symbols? And why we want to cache it ? Is it too big for 500 GB drives which are common now a days?

enter image description here

Upvotes: 1

Views: 248

Answers (1)

jessehouwing
jessehouwing

Reputation: 114461

Symbols are the .pdb files that are generated when you build your code with the proper features enabled. These files provide a mapping from the binary code to the actual statement that was written for that piece of binary to be generated.

Since they're usually downloaded from a remote location and since they don't change that often for external libraries, it really speeds up the debugging when you don't have to download these files each and every time.

On my machine the symbol cache is about 600MB in size. Your 500GB drive should be more than enough for normal operations.

See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363368(v=vs.85).aspx

This feature is especially powerful when you have Framework Source Stepping enabled, this, in combination with the Microsoft Symbol Server, allows you to debug certain parts of the .NET framework. The symbols are downloaded from Microsoft and from the symbols Visual Studio reads which source file(s) to download to enable debugging for you.


The Symbol cache is used during debugging, to give richer information. There is a similar dialog inside each solution that defines what level of debug symbols are generated during the building of your solution. This is where the Assembler/Compiler is told what to do with these things.

enter image description here


And inside Team Build (if you're running TFS) there is an option to generate these symbol files during the automated build process. These files can then be referenced from IntelliTrace or WinDbg to provide you a richer debugging experience without having to deploy a debug version or the debug symbols to your production environment (deploying the .pdb files to you production environment causes higher memory usage and a small performance hit because the runtime will load these symbols into memory. When exceptions happen it will also cause additional overhead, because these are enriched with the information found in the symbol files.

See: http://msdn.microsoft.com/en-us/library/vstudio/hh190722.aspx

Upvotes: 1

Related Questions