20

I am using Visual Studio 2015.

I want to prevent symbols loading for all the core dlls like System.Net, System.Web etc..., I just want to load symbols only for the dlls which are in my solution.

I have already done this setting:

enter image description here

i.e in Tools >> Options >> Debugging >> Symbols >> Only specified modules

I have added my few dlls for which I want symbols to be loaded. But when I run my solution I still see in the VS status bar that it is loading symbols for the core libraries like System.Net, System.Web etc...

enter image description here

How can I prevent that?

I just want symbols of my 4 dlls which are in my solution to be loaded since my intention is to debug those dlls only and not the System core dlls.

Is this even possible?

Or will VS will always load symbols of core files.

Jason Evans
  • 28,906
  • 14
  • 90
  • 154
Raghav
  • 8,772
  • 6
  • 82
  • 106
  • Here are couple of resources that might be of use [Make Debugging Faster with Visual Studio](https://blogs.msdn.microsoft.com/visualstudioalm/2015/03/03/make-debugging-faster-with-visual-studio/) and this SO question [Visual Studio Debugging/Loading Very Slow](http://stackoverflow.com/questions/12567984/visual-studio-debugging-loading-very-slow) – Jason Evans Aug 22 '16 at 08:37
  • Thanks, though I fixed the broken link https://blogs.msdn.microsoft.com/visualstudioalm/2015/03/03/make-debugging-faster-with-visual-studio I have already gone through that link that's why I narrowed down my issue. Can you help me solving the specific issue I mentioned. – Raghav Aug 22 '16 at 08:39
  • I've just configured the same symbol options (Only specified modules, entered my module name, untick `Always load symbols located next to module`) and when I attached my VS to the w3wp.exe process, it has not loaded modules such as System.Dynamic for me. I'm not sure what's going on at your end. Sorry. – Jason Evans Aug 22 '16 at 08:53
  • Instead of attaching VS to w3wp.exe to some website in IIS can you run the VS solution itself. I am just running my solution and seeing the symbols loading. I have already restarted my VS. – Raghav Aug 22 '16 at 09:04
  • When I attach VS to w3wp.exe (before I changed my symbols settings) VS would show a number of modules having their symbols loaded. Now the loading symbols dialog appears for about one second, so something has definitely changed for me. – Jason Evans Aug 22 '16 at 09:12
  • I did read one comment that stated if a PDB for a module is located in the GAC, then Visual Studio will always load the symbols for that module. It might be worth viewing the `Modules` windows to see where the dll files are being loaded from. If they are in the GAC, then it might be that VS is loading their symbols regardless of your settings?? – Jason Evans Aug 22 '16 at 09:13
  • Well module window shows that symbol loading is disabled for all other dlls. – Raghav Aug 22 '16 at 10:27
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/121541/discussion-between-raj-and-jason-evans). – Raghav Aug 22 '16 at 14:33

2 Answers2

1

The following steps solved my similar issue:

At Tools -> Options -> Debugging -> Symbols

a. Enable the "Microsoft Symbol Server" option

b. Click "Empty Symbol Cache"

Kokul Jose
  • 1,384
  • 2
  • 14
  • 26
0

if you have a environment variable named "_NT_SYMBOL_PATH" this could be the reason. Symbols will load regardless of the visual studio setting as far as I know. More information about this variable is found here

Marc Wittmann
  • 2,286
  • 2
  • 28
  • 41