Blog Stats
  • Posts - 13
  • Articles - 0
  • Comments - 47
  • Trackbacks - 23

 

How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

One of the first things you will want to do after installing visual studio is to set it up to automatically pull down the correct symbols for system components when debugging. You do this by configuring Visual Studio to use the Microsoft Symbol Sever.

In VS 2005, do the following:

  1. Open Visual Studio. Goto Tools->Options
  2. Expand the “Debugging“ node
  3. Click on the “Symbols“ node under “Debugging“
  4. Click on the icon that looks like the new folder icon to add a new .pdb location
  5. Type the following for the location “smysrv*symsrv.dll*c:\symbols*http://msdl.microsoft.com/downloads/symbols“
  6. In the Cache symbols from symbol servers to this directory, enter the local path you used in step 5. In this case “c:\symbols“
  7. Click Ok.

To test it out, try attaching to some windows process like iexplore.exe (if you have IE running). Goto debug->windows->modules. You should now see that symbols are loaded for all the system dlls and iexplore.exe. You can also open the local path used in step 5 and you should see folders for all the dlls that have been debugged so far.

Happy Debugging!


Feedback

# re: How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

Gravatar Thanks for this. Shame it increases the debugging startup time somewhat by always rechecking for symbols it doesn't have. Worth it for those helpful call stacks though! 3/14/2006 10:17 AM | Paul Roberts

# re: How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

Gravatar Thnx a million mate ;-] That really helped 5/22/2006 2:57 PM | def420

# re: How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

Gravatar Regarding the startup speed, you only need to run against the symbol server initially until it pulls down all the symbols you care about. Once that's done, go back to the options dialog and unclick the PDB location. As long as you leave the "cache location" entry filled in, VS will continue to pull from the cached images... very quickly.

Obviously the cache will need to be reprimed if your system DLLs get updated by anything. VS should see that the PDBs are out of date and avoid misrepresenting the stack, at least. 7/20/2006 4:19 PM | MehYam

# re: How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

Gravatar And what happens if I want to debug a web part in Sharepoint 2007?

8/29/2006 11:15 AM | xa

# re: How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

Gravatar Um, shouldn't that be "symsrv" instead of "smysrv" ? 2/7/2007 11:25 AM | Ryan

# re: How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

Gravatar But what about doing that in the code ?

For example to enable WinDBG to link to the symb srv i set _NT_SYMBOL_PATH environment variable (create a registry key)

I have a code that uses VStudio as an automatic debugger, and i want that on each machine that runs my app , the symbol path that VStudio loads to be the same
sergges@gmail.com
4/6/2007 10:28 AM | Sergiu

# re: How to Setup Visual Studio 2005 to use the Microsoft Symbol Server

Gravatar like visual studio 11/8/2009 11:15 PM | step

Post a comment





 

 

 

Copyright © Tom Wisnowski