Sign in to follow this  

Debugging with Multiple DLLs

Recommended Posts

I'm trying to debug this C++ build that uses multiple DLLs but the issue is that I can not figure out how to break in another DLL where I want to. I tried adding the DLL project files to My solution, but doesn't seem to be working. When i create a breakpoint and then go into debug mode, the breakpoints have the hollow inside, stating that they've been disabled. Is there a way to fix this so that I can break where I need to? The section of code that I am trying to get to is not directly called otherwise it would make this trivial. I am using MS Visual Studio 2005 (no not the Expresss Ed). Any help would be greatly appriciated. thanks!
"A world without string is CHAOS!" ~Mouse Hunt

Share this post

Link to post
Share on other sites
At work I regularly attach to perhaps 4+ processes, and debug across 30+ DLLs. It's really quite easy.
As long as you are attached to the program that has the DLL loaded, then you can simply open up the source file into the instance of visual studio that is attached to the EXE, and place a breakpoint in the DLL code.
This works even if you have your DLL loaded by an exe you didn't write.
If the DLL has not loaded yet, then the breakpoints will show as disabled, but it will still hit them once the DLL loads.

You don't have to modify any solution, project, or source files at all.
I assume that the DLLs are debug builds, and are keeping the generated pdb files around?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this