Improvements when debugging .NET Reference Source
Historically since the inception of this effort, Microsoft have published sources and PDBs for every major .NET framework update namely .NET framework 4.0 and 4.5. However these builds would be rendered effectively useless the moment any update to the framework was released, since the binaries on the updated box no longer matched the PDBs that were indexed on the reference source server. Unfortunately the design of the system that they had in place was geared towards doing single and infrequent pushes of sources and symbols out and did not account for the sheer volume of builds and patches that come are produced out of the .NET framework build system.
Starting with .NET 4.5.1 MS have radically changed the symbol indexing and publishing process to be in sync with the build process such that as and when updates are shipped , the corresponding PDBs are also updated to the reference source site appropriately. The summary of this is going forward the reference source debugging experience should just work. If it does not use the troubleshooting instructions at the link provided above.
There is one caveat to this experiences; for security updates or updates that are otherwise deemed to have changes that they do not want leaked (think security exploits) you will still have a debugging experience, but rather than the file that corresponds to that PDB, you will get the last broadly shipped copy of that file. This could manifest itself in a slightly skewed debugging experience if you are stepping through a file where the fix was made.
How does reference source relate to the Microsoft Symbol Server?
The Microsoft Symbol Server is a repository where all public PDBs generated by most teams at Microsoft end up. However all PDBs that are present here do not have any source information in them, which makes them not very useful for stepping through sources. When you are trying to debug .NET Framework source please ensure that you do not have the Microsoft Symbol Server enabled. Doing so could result in the symbols being loaded from the Microsoft Symbol Server and the source stepping experience would not work in that case. You can disable Microsoft Symbol Server lookup via Tools | Options | Debugging | Symbols. Ensure that the checkbox in front of Microsoft Symbol Server is unchecked.
There is more:
- Replacing referencesource.microsoft.com. Microsofts most immediate goal is to retire the current page http://referencesource.microsoft.com in favour of the new browsing experience. Please take a look at the old site.
- Updating the indexed sources. The version of the framework that we currently have indexed is .NET Framework 4.5.1. Due to the improvements they made in the engineering system, they’re now able to update both the symbols and the sources as new versions of the framework are released.
- Adding source for assemblies. As you can probably notice, the set of assemblies that they have is not complete. They don’t intend to keep it that way, so the plan is to expand the set of assemblies over time.
To Sum Up
The announced of the new browsing experience for the .NET Reference Source, will fix the long standing issue with using reference source for debugging.
Set Up Stepping Through .NET code
Here is a link with instructions on how to set up you Visual Studio to enable source code stepping