Slicedbread
Slicedbread

Reputation: 2244

Debug into a remote dll library in visual studio

I'm trying to step my debugger into a .dll library that I have installed from a private nuget repository in a separate solution.

The dll is one that I have written and the only times I've been able to successfully debug into it my method has been as follows:

Unfortunately this does not always work and I am not sure what happens differently in the situations where it does and does not work.

https://learn.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger

I went through the above link and tried the things suggested as well as manually placing pdb files everywhere I thought VS may go to look for them but I've had no luck at all remote debugging outside of the steps I outlined above.

Can anyone provide me with a way to consistently debug into my library?

Unfortunatley pulling the library into the runnable solution is not an option for me. I do have access to make changes in my private nuget repository if there is a way to remotely host the pdb files with new dll versions.

Upvotes: 0

Views: 1227

Answers (3)

Leo Liu
Leo Liu

Reputation: 76770

Debug into a remote dll library in visual studio

You can try to use following lightweight solution:

  1. Put the pdb and source code file in the NuGet package alongside the dll.
  2. Add the source code to the Debug Source Files for the solution that references the package.

Check this thread for some more details.

Note, if you update the dll version in the private nuget repository, you should update this package on the debug project and update the path of Debug Source Files.

Upvotes: 0

Chilberto
Chilberto

Reputation: 31

From the description I am not entirely sure but two options I have had to manipulate in the past that might be relevant are in Options -> Debugging.

Try turning off Enable Just My Code and Require source files to exactly match the original version.

Upvotes: 0

bginsburg
bginsburg

Reputation: 123

Try using dot peek https://www.jetbrains.com/decompiler/ You should be able to do it using it

Upvotes: 1

Related Questions