debug a project with references in Visual studio

If you compile the library on your machine and include the .PDB files your visual studio should be able to step into the code if you use the Step In command while debugging.

If you want to breakpoint in that code, file->open then select the .cs file from the other project and set a breakpoint.

Hover your mouse over the breakpoint and it'll say something like:

At Something.cs, line 12 character 34 ('MyOtherLibrary')

This means the debugger is attached to the code in your helper library.


2 more things:

  • make sure PDB is loaded for the DLL you are adding. Check if in the "Debug -> Windows -> Modules" window the DLL in question have PDB from the correct path. If not you can force VS to load PDB by right click -> load symbols on the module in the same window.

  • if everything else fails try to turn off "my code only" in Tools -> Options -> Debugging. This will make VS to try load PDBs for all Dlls and allow breaking on throw for every exception.