François Beaune
François Beaune

Reputation: 4500

Attach Visual Studio debugger to multiple DLLs

I'm developing several native C++ DLLs simultaneously using Visual Studio Ultimate 2013.

These DLLs are plugins for an application. I have configured Visual Studio's debugger in such a way that it launches that application (which in turns loads my plugins) and attaches to it.

Since these plugins are supposed to work together, I would like to debug them together, place breakpoints in them, etc.

Is there a way to achieve this?

The solution described in Running two projects at once in Visual Studio does not seem to apply here.

Upvotes: 0

Views: 829

Answers (1)

Logicrat
Logicrat

Reputation: 4468

What I do when debuting DLLs is to have the debug build of the DLL open in Visual Studio, and make sure that the debug build is the one to be loaded by the calling application. I start the calling app, and pause it either by setting a breakpoint or showing an alert. Then go back to Visual Studio for the DLL, and from the Debug menu, select Attach To Process. Select the calling app's process. At that point, you should be able to set breakpoints in your DLLs in Visual Studio. Once that's done, you can proceed to run the calling app. I'd suggest you have each of the DLLs you are working on open in VS when you do this.

Upvotes: 1

Related Questions