Visual Studio: debugging related DLL, I have a source in another SLN

I am trying to debug a project that has a link to a DLL that I added, the DLL is stored in an external directory, and I just added the link. Now, of course, I can debug my project, but the line that calls the method on my other DLL, I can not enter into it, that is, F12.

One way to do this is to add my project (dll) as an existing project to my solution and replace the referenced DLL to use the attached project, and not the file on disk.

But what a mess, I'm sure there is a cleaner way?

I seem to remember if I was copying some PDB files or something, but I can’t remember. And I need to open 2 copies of visual studio, 1 for my main project and 1 for my DLL link ??

+53
c # visual-studio visual-studio-2010 visual-studio-debugging
May 14 '13 at 15:04
source share
4 answers

Restore the second solution in debug mode on your own machine (so that the file paths in this PDB are specific to your computer).

Copy both the .DLL and .PDB files to the help folder. Visual Studio will automatically download the .PDB file and use the file paths to display the source.

You can also use Symbol Server and Source Server to achieve this when the reference assembly is built elsewhere: http://msdn.microsoft.com/en-us/library/vstudio/ms241613.aspx

+59
May 14, '13 at 15:08
source share

I got the solution by doing below

Try disabling Just My Code (JMC).

Tools -> Options -> Debugger Uncheck the box "Include only my code"

+7
Nov 19 '16 at 12:16
source share

I had the same problem that I solved by cleaning and restoring the solution. It will fix the links in the .pdb files to find and hit the breakpoint in the second project.

+1
Jan 11 '17 at 3:46 on
source share

When you build Debug, all the dll and pdb files are installed in the host project. Therefore, you do not need to copy files manually.

Right-click on the solution, select Add / Existing Project ... Go to the Class lib folder and select the proj file (for example, myproj.csproj). Files are not copied, just referenced and you can open the source for the class in the IDE and set breakpoints in the usual way, and it just works.

0
Nov 17 '16 at 16:27
source share



All Articles