Configuring Visual Studio

To configure Visual Studio for symbol/server use, follow these instructions:

  1. Go to Tools -> Options -> Debugging -> General.
  2. Uncheck “Enable Just My Code (Managed only)”.
  3. Uncheck “Enable .NET Framework source stepping”. Yes, it is misleading, but if you don't, then Visual Studio will ignore your custom server order (see further on).
  4. Check “Enable source server support”.
  5. Uncheck “Require source files to exactly match the original version”
  6. Go to Tools -> Options -> Debugging -> Symbols.
  7. Select a folder for the local symbol/source cache.
  8. Add symbol servers under “Symbol file (.pdb) locations”. Pay attention to the correct order, because some servers may contain symbols for the same binaries: with or without sources. We recommend the following setup:
    • http://referencesource.microsoft.com/symbols
    • (path from Visual Studio tab after you log in to this site)
    • (other symbol servers with sources)
    • http://msdl.microsoft.com/download/symbols
    • (other symbol servers without sources)

The reason we ask you to enter a personalized path to our symbol/source server is to be able to provide a better service through monitoring what symbols or sources we are missing, and what projects are mostly used.

Tips & Tricks

  1. When using a symbol server for some of your dependencies be sure not to have any other PDB files of those libraries present in the same directory as the DLL files. When debugging code using Library.dll, Visual Studio will always first load Library.pdb from the same directory, which will disable symbol and source server usage.

  2. To more effectively debug .NET Framework code it is useful to disable optimizations using the following command (environment variable): set COMPLUS_ZapDisable=1

Posted by Marcin Mikołajczak (TripleEmcoder) on Monday, 22 February 2010  •  Comments (0)  • 

Comments

Send your comment

Log in