The Microsoft Symbol Server is a great boon for debugging on Windows. Here’s a neat way to create a local symbol cache so that your debuggers launch more quickly.
First, make a share on each of your machines for a local symbol cache. Your username will need write permission to this location.
net share sym$=%SystemDrive%\\sym /GRANT:%USERNAME%,FULL
Next, elect one machine, perhaps a beefy server, to be the LAN master cache and set the following environment variable on every box:
set _NT_SYMBOL_PATH = ^
srv*\\\\127.0.0.1\\sym$* ^
\\\\localserver\\sym$* ^
http://msdl.microsoft.com/download/symbols
You’ll want to adjust the line above in case you use a share other than sym$ or a LAN master cache other than localserver.
Now, when a debugger wants a new pdb he’ll use the following search order:
- Local sym$ share
- \\localserver\sym$
- The Microsoft Symbol Server
When the debugger fetches a PBD from an upstream source, he’ll replicate it downstream (official details here). After a few debug sessions, you’ll have a nice big local PDB repository and your debugger will load much faster.
This works on all the Microsoft debuggers: cdb, ntsd, windbg, kd and even Visual Studio.
(credit to Mark Lacey for this tip)

0 Responses to “Local Symbol Server Caching”
Leave a Reply