I have a project(A) that references an assembly from an external project(B) class library that is located in another vs solution.

I have yet to understand how i can efficiently debug the class library from B while running the program from project A. Is there something i have to enable on project B such as debug info etc so i can step-into at debug time from A?

7 Answers
7

By default the debugger tries to restrict the view of the world to code that is only contained within your solution. This is really heplful at times but when you want to debug code which is not in your solution (as is your situation) you need to disable JMC in order to see it. Otherwise the code will be treated as external and largely hidden from your view.

EDIT

When you're broken in your code try the following.

Debug -> Windows -> Modules

Find the DLL for the project you are interested in

Right Click -> Load Symbols -> Select the Path to the .PDB for your other project

the specific checkbox was unchecked already. What i noticed though, is that it does enter into a method of the external library, but it steps over when i try to call a method that is part of an interface.
– KonstantinosMar 17 '09 at 15:41

You might need to go to the properties of a DLL, and ensure that Copy Local is set to True. Otherwise, Modules won't be able to find the .pdb for your reference.
– Bryan RaynerNov 25 '14 at 18:21

Just My Code doesn't seem to make any difference (I can jump into external code even with it enabled), but finding the module in the debugger helps.
– TheOperatorDec 30 '15 at 22:43

3

A matching symbol file was not found in this folder.
– ChristineFeb 23 '17 at 19:53

1

If you don't have PDB files for a referenced module, ReSharper can be used to decompile binaries using the "Load Symbols with ReSharper Deecompiler" option in the right-click menu in Debug/Windows/Modules. very powerful.
– emilastJan 12 '18 at 8:15

This has bugged me for some time. What I usually end up doing is rebuilding my external library using debug mode, then copy both .dll and the .pdb file to the bin of my website. This allows me to step into the libarary code.

This way, whenever I build the external dll, it gets updated in the main application's directory. If I hit debug from the external dll's project--the main application runs, but the debugger only hits breakpoints in the external dll. If I hit debug from the main project, the main application runs with the most recently built external dll, but now the debugger only hits breakpoints in the main project.

I realize one debugger will do the job for both, but I find it easier to keep the two straight this way.

In the project settings tab look for 'visual studio directories' in the 'source code' field include the path to the openCV sources. Then make sure that the .pdb files for each of the debug dll are in the same directory as the dll.

Assume the
-Project_A (produces project_a.dll)
-Project_B (produces project_b.dll)
and Project_B references to Project_A by NuGet packages then
just copy project_a.dll , project_a.pdb to the folder Project_B/Packages.
In effect that should be copied to the /bin.

Now debug Project_A. When code reaches the part where you need to call dll's method or events etc while debugging, press F11 to step into the dll's code.