First time exception - System.pdb not loaded

Viewed 20945

I use VS2017 and I get the following when I hit F5

enter image description here

It happens for certain projects only, even if I disabled the Symbols support under VS options. Although in the past, for the same projects it used not to throw even with Symbol support enabled.

So, since I assumed this must be some kind of cached VS setting project specific, I deleted bin, obj, .vs , SymbolSource folders but the same.

If I enable Just My Code it does not throw, however this is not what I want since I cannot debug assemblies which I already have the symbols.

As far as I know even if Symbols Support is enabled it shouldn't throw if there isn't a related Symbol Server declared in VS Options.

This behavior is not specific only to System.dll but happens even if I attach to external processes which I do not have symbols, meaning that filtering with the Load Only Specified Module VS option again is not what I am looking for.

So, does anybody have an idea on how to avoid such annoying exceptions while allowing to utilize Symbol Support for other assemblies which I have configured.

4 Answers

None of the above worked for me because I was using external dll which doesn't have the pdb fir with it ,i found that when i unchecked the breakpoints for all from

Debug => Windows then check 'Common Language Runtime Exceptions' or restore default

So when it throw exception and you don't see it it want to use the pdb file to store the stack trace but it couldn't find it

I had to check Enable native code debugging in project properties to get rid of this issue:

enter image description here

Related