Here is the answer, thanks to Hans Passant. Note that this solution raises additional questions.
-
Ensure https://referencesource.microsoft.com/ contains the exact version you’re debugging.
- How? Reference source specifies “.NET Framework 4.6.2” but a module version is something like: “4.6.1586.0”
- You may need to uninstall security updates as explained here: How do you enable “Enable .NET Framework source stepping”?
-
Configure Visual Studio as specified here:
https://referencesource.microsoft.com/setup.html- Untick “Enable Just My Code”
- Tick “Enable .NET Framework source stepping” (this should have been the only step needed)
- Tick “Enable source server support”
- Untick “Require source files to exactly match the original version”
-
Confirm symbols are loaded in the Modules window, with source indexing included.
- How can you tell if source indexing is included? The modules window doesn’t specify if a PDB has stripped source information.
Microsoft could make this process a lot more robust by giving helpful error messages instead of silently failing.