Question

If I have a running EXE I can attach a debugger to it. What about a DLL? Say a 3rd-party application (closed source, no debug data) allows me to create plugins as DLLs and I want to debug one of these. What's the right way?

Was it helpful?

Solution

Project + Properties, Debugging. Set the Command setting to an EXE that loads the DLL, that 3rd party app. Set breakpoints in your DLL code, they'll activate as soon as the DLL gets loaded. The hollow looking breakpoint indicator changes to a filled circle. And the debugger breaks as soon as your code is called.

OTHER TIPS

Debugger is attached to a process. DLL is not a process, it's just one module of it. So if you want to debug your DLL, attach debugger to the process where your DLL is loaded and used.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top