I have a solution with many projects and some of them are located outside of the solution path (I copy the compiled dll's and pdb's as Post-build event with xcopy)!
If I want to step into the dll's they are located outside of my solution:
"The breakpoint will not currently be hit. No symbols have been loaded for this document"
Which steps are needed to be able to debug also the external dll's?
If it is a file (dll) reference, you need the debugging symbols (the "pdb" file) to be in the same folder as the dll. Check that your projects are generating debug symbols (project properties => Build => Advanced => Output / Debug Info = full); and if you have copied the dll, put the pdb with it.
Program database (PDB) is a file format (developed by Microsoft) for storing debugging information about a program (or, commonly, program modules such as a DLL or EXE). PDB files commonly have a . pdb extension. A PDB file is typically created from source files during compilation.
If you see a message stating that Visual Studio cannot find or open the PDB file, try using Visual Studio's debugging tool. Go to Tools > Options > Debugging > Symbols and select Microsoft Symbol Servers.
Debug from the DLL project Set breakpoints in the DLL project. Right-click the DLL project and choose Set as Startup Project. Make sure the Solutions Configuration field is set to Debug. Press F5, click the green Start arrow, or select Debug > Start Debugging.
The simplest explanation is that the DLL simply isn't loaded yet. Double-check your assumptions with the Debug > Windows > Modules window, locate the DLL you are trying to debug in the list.
If you do find it back there then the debugger may have a problem reading the PDB file for it. Diagnose that by right-clicking the DLL and click Symbol Load Information. It shows you where the debugger looked for the PDB file.
In later VS versions also check the "User code" column in that same window. If it is set to "no" then use Tools > Options > Debugging > General, untick "Enable Just My Code".
Finally watch out for using a managed debugger to debug native code or the other way around. It isn't clear from the question since you forgot to document what kind of code you are trying to debug. You'll need to enable mixed mode debugging if that's the case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With