Debugging a DLL which is in another solution on VS

2019-07-22 17:01发布

问题:

I'm am trying to debug a DLL which is called from a VC++ application, but cannot step-inside the DLL function because the DLL source is located in another solution project.

I have tried to set a break point right before the DLL function call but when I try to step-in it just passes right down.

I am aware that it is possible to just debug the DLL on its own and feed it arguments, but since there are many variables, I do not find it practical for debugging purposes.

Is there a way to debug a DLL that is separate from the Invoking Application as if it where a single solution file?

回答1:

One thing you can do is start up your app outside of VS, open the solution with the DLL, and attach to the application.



回答2:

Build a debug version of the DLL and link to it in the debug configuration of your project. That should get you what you need. It should find the source of the DLL and you should be able to step into it.