Configuring VS to Debug .NET Framework Source Code

It's finally here - the launch of the .NET Reference Source project.  This post (hopefully!) contains everything you need to know.  Over the past few weeks, we ran a pilot of this feature and collected lots of great data that helped us work through some issues and understand where people were likely to have problems. 
First, though, if you have any problems, please make sure you've followed all of the steps exactly as described.  If you're still having problems, please check the FAQ/Troubleshooting section at the bottom.  If that doesn't work, post a comment below and I'll look into it.
BASIC SETUPNote this functionality is not available on the Express versions of the Visual Studio 2008 products.
1) Install the Visual Studio 2008 QFE.  This Hotfix just updates a DLL that's part of the Visual Studio debugger that fetches the source files, more details on the download page.
UPDATE:  If you get an error installing the Hotfix , try inserting your VS 2008 DVD and then running the Hotfix EXE again.  We're looking into the root cause - it's related to having a prior version of VS 2008 (e.g. Beta 2) installed on the machine.  But this workaround should allow the Hotfix to install properly.
2) Start Visual Studio 2008 and bring up Tools > Options > Debugging > General.  If you are running under the Visual Basic Profile, you will need to check the box on the lower left of the Options Dialog marked "Show All Settings" before continuing (other profiles won't have this option).
Set the following two settings:
  • Turn OFF the "Enable Just My Code" setting
  • Turn ON the "Enable Source Server Support" setting
Your settings should be as below:

3) Next, bring up the "Symbols" Page and set the symbols download URL and a cache location.  Specifically, set the three settings below:
    • Set the symbol file location to be: http://referencesource.microsoft.com/symbols
    • Set a cache location.  Make sure this is a location that your account has read/write access to.  A good option for this is to place this path somewhere under your user hive (e.g. c:\users\sburke\symbols)
    • Enable the "Search the above locations only when symbols are loaded manually" option.
When you're finished, the settings should look like the image below:

Setup is done!  That's it, really!
DEBUGGING INTO FRAMEWORK SOURCEFor this simple example, we'll start with a blank C# Windows Application project, but it will work the same with a VB, Web, or WPF project.  To walk through this, go ahead and create that project.
Set a breakpoint in Form_Load:

Now run your project to hit that breakpoint and go to your Call Stack window (CTRL+ALT+C).  In the Call Stack, right click a frame that starts with System.Windows.Forms.dll, and choose "Load Symbols".  This will load the symbols for the System.Windows.Forms assembly, which are about 10 megabytes, so the speed of the download will vary according to your connection speed.  Note that Visual Studio may be unresponsive during this time.  However, this download is a one-time cost for each assembly.  The symbols (PDB) file will be cached on your machine, in the directory specified in the steps above. 

This will load the symbols for the DLL from the server, and you'll see some information in the status bar to reflect this.  Note that when this completes, the call frames will turn black and line numbers will be available.  Note you'll need to do the Right Click -> Load Symbols step each time you launch a debugging session (but, again, the symbols will now be cached locally so they won't have to download).  For more information on this, see the ADVANCED USERS section below.

You have now loaded the symbols for the Windows Forms DLL and can begin viewing the code.  You can view code in any way that you normally would in a debugging session.  In this case you can either Step In to the line of code above, or you can double-click one of the frames in the Call Stack Window.  For this case, we'll step in (F11).
The first time you step into code, we'll be presented with the EULA for accessing the source code.  Please take the time to read this EULA.  If you agree to the terms of the EULA, hit ACCEPT, and the source will then be downloaded.
That's it! You're now debugging .NET Framework Source!

Now, for each assembly that you'd like to debug into just repeat the steps above (note you'll only see the EULA once, not for each file).
There are times when the Assembly you'd like to debug into isn't on the call stack, for example in the code below:

Before you step in to Graphics.DrawRectangle, you need to get the symbols for System.Drawing.Dll loaded.  To do this, we use the Modules Window (CTRL+ALT+U).  This lists all of the modules (DLLs) loaded by the debuggee.  Just find System.Drawing.DLL in this list, right click, and choose Load Symbols.

Note that once a