سؤال

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?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top