0

I am looking to debug a project that references DLLs remotely. I would like to be able to step into the DLLs with the debugger. By following this tutorial I was able to make this work on my local machine. However, when I use Visual Studio 2017 Professional Edition to attach to a process (i.e the same application as an executable file) I am no longer able to step into the DLLs that I was able to on my local machine. How can I link the DLLs or somehow get this feature to work? Thank you!

Josh Zwiebel
  • 883
  • 1
  • 9
  • 30
  • See [How to set up remote debugger](https://stackoverflow.com/questions/11586500/how-to-set-up-remote-debugging-on-a-machine-without-visual-studio/24871833#24871833) and the MS tutorial for [remote debugging](https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=vs-2019) – FeRaaC Jul 25 '19 at 15:01
  • I know how to set up the remote debugger and it is working. My question is how to step into the DLLs in the project while debugging remotely. – Josh Zwiebel Jul 25 '19 at 15:03
  • So you have an exe on your machine and a dll on a remote machine? – Jeff Jul 25 '19 at 15:03
  • I have an executable and its dlls on the remote machine but I have the source code for both on my local machine. I can update the question if that makes it clearer – Josh Zwiebel Jul 25 '19 at 15:04
  • 1
    See the last section of the MS tutorial. You'll need to load the correct symbols of the dlls you want to step into. You can also specify the symbol file location and which to automatically load under `Options > Debugging > Symbols` – FeRaaC Jul 25 '19 at 15:04
  • the last section talks about loading symbols for managed code, but my dlls are unmanaged. – Josh Zwiebel Jul 25 '19 at 15:08
  • Ok, so the project is set to mixed debug (otherwise it won't function locally), you presumably have the symbols locally. I'd check to deploy them also remotely and check if you selected the right debugging mode in the attach to process window (should be managed (versions) AND native) – FeRaaC Jul 25 '19 at 15:24

2 Answers2

1

You need to have access to the pdb file which contains the debug info.

Jeff
  • 2,061
  • 4
  • 27
  • 45
  • Not only access, but also load them. Microsoft pdb files can be loaded form the microsoft symbol server and nuget packages normally publish them on the nuget.org symbol server – FeRaaC Jul 25 '19 at 15:09
0

Credit to u/FeRaaC. The issue was that when attaching to process I was only attaching to native code not native and managed versions. The right debugging version had to be selected and as the symbols and DLLs were already loaded correctly that was the last step for it to complete. Thank you!

Josh Zwiebel
  • 883
  • 1
  • 9
  • 30