Set up your system to use Microsoft's public Symbol Server
If you're always futzing around with Process Explorer or trying to load your DLLs into someone else's memory space (like Explorer.exe), you're running WinDBG (or you want to) on Vista memory dumps, then you'll want to hook up to Microsoft's public Symbol Server for the PDBs for Microsoft's various and sundry processes.
Here's a good "Getting Started" article at MSDN as well as this one on How to use a Symbol Server.
Basically all you have to do is right-click My Computer, then click Properties. Select the Advanced tab and click the Environment Variables button. Set a variable called _NT_SYMBOL_PATH to something like:
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
...and you'll automatically get the PDBs downloaded directly from Microsoft while debugging. Be aware that there's often a long pause the first time the big ones come down. After that, it's speedy.
As long as the Symsrv.dll file is in your C:\Program Files\<Visual Studio>\Common7\IDE folder - it's put there by installing Debugging Tools for Windows - you'll get the symbols in VS.NET. Here's a video explaining how.
Sysinternals' Process Explorer has a dialog box where you can configure Symbols as well that it'll use to resolve function names while you're in the very useful Threads tab of a process' properties.
Gets you actual function names and stack locations that are meaningful in Process Explorer:
You can also set up a Symbol Server at your company (we have one here at Corillian, but it's not well-advertised internally - yet). Here's a screenshot of part of my C:\symbols folder after debugging. Notice that I've set the folder with the Compressed attribute. That's useful because PDBs will typically squish at least in half.
If you really want to go bonkers, you can also setup a Source Server that will automatically retrieve the files needed to debug at the source level. Here's a great article from this August explaining what's involved in setting up your own Source Server.
This is one of those things you should just setup and forget and you'll be happy when it's already ready for you when you need it.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Comments are closed.