First time here? Check out the site's "greatest hits" or read a post from the archives. Feel free to leave a comment or ask a question, and consider subscribing to the latest posts via RSS or e-mail. Thanks for visiting!
« The Importance of being UTF-8 | Main | How Geeks become Do-It-Yourselfers and T... »

Set up your system to use Microsoft's public Symbol Server

Posted in Programming.

Symbolserver1If 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.

Symbolprocexp

Gets you actual function names and stack locations that are meaningful in Process Explorer:

Symbolprocexp2

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.

Symbolpath

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.

Tracked by:
"Microsoft's Symbol Server" (Commonality) [Trackback]


Saturday, September 30, 2006 3:31:19 AM (Pacific Standard Time, UTC-08:00)
Also keep in mind that Visual Studio 2005 uses the symbol server if it is configured, and this can be both a blessing and a curse. As I unwittingly discovered while debugging a broken unit test, Visual Studio 2005 took its sweet time between clicking Run Test... in Debugger and hitting the breakpoint. This is primarily because (as I recall) it attempted to download symbols for a boatload of .NET DLLs.
Lothan
Comments are closed.

Contact

Sponsors

Hosting By

On this page...

Tags

Calendar

<October 2008>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

Archives

Google Ads