Prevent Visual Studio from trying to load symbols for a particular DLL
Solution 1:
You can't do this in a very fine grained fashion but you can disable automatic symbol loading and then manually choose the symbols to load via the Modules window (Debug -> Windows -> Modules).
To Disable Automatic Symbol loading
- Tools -> Options -> Debugging -> Symbols
- Check "Search the above locations only when symbols are loaded manually"
Solution 2:
Also check that you have no "_NT_SYMBOL_PATH" environment variable. If you have this var symbols will load regardless of VS settings.
Solution 3:
From Visual Studio 2010 onwards, you can go to:
Tools -> Options -> Debugging -> Symbols -> Specify excluded modules
and enter the list of the dlls which take too long to load. I use the full path, given by the Output Window; maybe it accepts wildcards or simple file names.
Solution 4:
In my case it was because I had set "Enable .Net Source Stepping" to true in
Tools > Options > Debugging > General.
Rather than setting it to false, I set "Enable Just My Code" to true which automatically set "Enable .Net Source Stepping" to false. It gave me a warning before doing so:
Enabling Just my code automatically disabled .Net framework source stepping
Which suggests Just My Code
and .Net source stepping
are mutually exclusive.
I hope this helps someone.
Solution 5:
You can also set up symbol server exclusions which will not be attempted to download in HKEY_CURRENT_USER\Software\Microsoft\Symbol Server\Exclusions or possibly also HKEY_LOCAL_MACHINE\Software\Microsoft\Symbol Server\Exclusions or via a .ini file at %WINDIR%\system32\inetsrv\Symsrv.ini (use the header [exclusions] and put each exclusion on its own line). The exclusions are simple pattern matches, so use msxml5.* for example.