Loading pdb files for external assemblies in visual studio

69 Views Asked by At

Scenario: I publish libraries to my personal nuget Server and pull these libraries down into other solutions using NuGet manager in Visual Studio. I've got some unusual behaviours in a controls library (stigzler.controls) which is consumed by another solution (call it MyFabApp) and I'm wanting to be able to place break points in it so when I run from MyFabApp, it stops at these points. It's very strange as Debug.Writeline in stigzler.controls doesn't function in MyFabApp despite working independently in the Solution it sits in.

Examining the build - there is no stigzler.control.pdb in the MyFabApp bin folder. Guessing that makes sense given it's pulled down from nuget.

I've disabled Just My Code in Tools>Options>debug. I also added the directory containing the stigzler.control.pdb file to (MyFabApp)Solution>Properties>Debug Sources Files - no dice. Also added the path to the pdb to Tools>Options>Debugging>Symbols - still no dice.

I'm obviously missing something - would appreciate advice. I'd like to avoid referencing stigzler.control on my local machine directly from MyFabApp, sticking with updates managed via my personal nuget server (assists with coding on the move).

1

There are 1 best solutions below

3
Minxin Yu - MSFT On

For release mode, there is embedded symbol option in DLL Properties -> Build-> General. Open the library source file in the test application Visual Studio project and hit the breakpoint.

.NET

enter image description here

.NET Framework

enter image description here