2

I have checked the "Enable .NET Framework source stepping" debugging option in Visual Studio created a symbols cache directory. Now when I debug a project, Visual Studio creates a dialog saying "Downloading public symbols" and listing a referenced module. This occurs for every referenced module.

The upshot is I sometimes wait several minutes before I can actually begin debugging.

It is possible to hit "Cancel" and go straight to debugging. Then the next I debug it picks up where it left off.

Looking at my HTTP traffic, it appears that for every module it looks at referencesource.microsoft.com for the symbols. Symbols hosted by that server (ie, Microsoft modules like system.dll) are downloaded to the symbol cache. Other symbols get a file in the "FailedLoads" folder of the symbol cache with the text "PDB Not Found". No information about the failure is found in the Output window even though "Print source server diagnostic information messages to the Output window" is checked.

Once a module either has symbols in the cache or a file in FailedLoads folder, it does not cause the dialog to appear again. So letting the process complete once addresses the slow debugging startup time until new references are added.

I tried several things to see what would happen. Nothing pointed to a real solution.

  • Unchecking "Enable .NET Framework source stepping" resolves the issue
  • Setting automatically load symbols to include or exclude by default does not change the behavior
  • Including or excluding a particular module from automatically loading symbols does not change the behavior for that module
  • Checking/Unchecking "Enable source server support" or any of its child options does not change the behavior
  • Checking/Unchecking the "Microsoft Symbol Servers" symbol location does not change the behavior
  • Adding new symbol locations does not change the behavior. Modules available at these new symbol servers still end up in the FailedLoads folder, and no HTTP requests are made to them during the "Downloading public symbols" dialog.
  • Getting the symbols into the symbol cache by alternative means (ex, loading from a different symbol server while debugging) worked for avoiding the "Downloading public symbols" dialog for that module.

I have reproduced this issue on VS2013 Update 1, VS2015 Update 3, and VS2017 RC. Interestingly, I believe I had used VS2013 for years without this issue. I think it started a couple of months ago around the time I switched to VS2015.

Does anyone know if this is a known bug, or if there is a way to enable .NET Framework source stepping while disabling this behavior?

ChaseMedallion
  • 20,860
  • 17
  • 88
  • 152
Daniel Koverman
  • 2,545
  • 2
  • 21
  • 30
  • 1
    You probably have .NET 4.6.2 installed, most typically through the last Win10 update. The reference source server is notoriously behind. It is right now and does not have PDBs for 4.6.2. Details [in this post](http://stackoverflow.com/a/27655501/17034). – Hans Passant Nov 22 '16 at 20:55
  • @Hans, thanks for the info. But I believe one of us is misunderstanding the other. My problem is that VS is taking a long time trying to download dozens of symbols files, not that I'm unable to get the .NET symbols files (which is what I think you are answering). I would like for VS to either wait to download symbols until it needs to load them, or at least only wait to download symbols for modules related to the .NET Framework (rather than every referenced module). – Daniel Koverman Nov 22 '16 at 21:09
  • The post tells you how to get the diagnostics that you can't find in the Output window. Without them it is just guessing. And it matters when you got the update, it just takes a good long while for the cache to get updated, lots of PDBs. "Picks up where it left off" is the expected behavior. – Hans Passant Nov 22 '16 at 21:18
  • 1
    I had the same error. Changed the symbol file location to my c: which solved my issue – Marcus Höglund Nov 23 '16 at 14:20
  • My environment is Win10, VS2017 version 15.4.0, after creating a junction by mklink /J C:\symbols10 D:\work\Symbols10, and change SRV\*C:\Symbols10\*--microsoft-symbol-server-- My visual studio stopped downloading symbols sloooowly from the server although it already downloaded and saved into the cache N times. – zhaorufei Mar 12 '18 at 08:40

0 Answers0