3. Symbols
Produced by .NET compilers
Stored in PDB files
Contain – much less than for native
Source file names
Line # references
Local variable names
Only the info that is not already contained in
managed assemblies
4. Symbol File Creation
Created at compile time
A unique GUID is embedded with each
compile
In the assembly
In the PDB
Mismatched assembly + PDB
5. Kinds of Symbol Files
Private / Debug
Debug Info = full
Full debugging experience
Public
Debug Info = pdb-only
Examine stack traces, dumps, Intellitrace
Generally, don’t do “full” for release builds
due to performance hit
6. Keeping Symbol Files
Symbols are as important as source!
Use with dumps from QA/production
Use with Intellitrace from QA/production
Without matching Symbols files, working
with either much more difficult
7. What to Keep
Local developer builds?
Builds released to QA?
Builds released to production?
Builds released to customers?
8. How VS Finds Symbols
It uses a search path
Folder relative to the binary
c:MyDirsymbolsdll
c:MyDirdll
c:MyDir
Configured paths, cache and Symbol Server
Environment Variable: _NT_SYMBOL_PATH
Tools / Options / Debugging / Symbols
List of Search Paths
9. Supported Search Paths
Local drives
Network drives
Symbol server
Ex.
srv*http://msdl.microsoft.com/download/symbols
Local cache (highly recommended)
Ex. cache*c:MySymbols;
12. Other Tools Symbol Usage
WinDbg / SOS – Low level debugger
Intellitrace – Runtime event recorder
13. Keeping Your Symbols
Application & Library Symbols
Store them with your release on a file share
Copy them back into place as needed for
debugging
14. Keeping Your Symbols
Put them on a Symbol Server
symstore – part of the Windows SDK
Reference stored symbols via file path
SymbolSource.Server.Basic
http interface to symstore
Stores NuGet packages & symbols
bit.ly/SymbolSourceServerBasic
NuPeek
Stores NuGet packages & symbols
https://bitbucket.org/thinkbeforecoding/nupeek
15. Keeping Your Symbols
TFS Build System
Can store source, binaries and symbols
Good blog post:
http://bit.ly/TFSSourceSymbols
16. My Goal
Move from CruiseControl.NET to TFS
Builds
Use TFS Build Management
For
Binaries
Symbols
On
All QA Builds with retention for 2-3 months
All Release Builds with retention as long as they
are in use.