Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a DLL called from a DLL in Delphi

Let's say I have an EXE named A, which loads a DLL named B, which in turn loads another DLL named C. All of these three are written in Delphi. I have the source for all three.

If I want to debug DLL B, I have no problem. I go to Run|Parameters and enter A.EXE as the host. When I click run, Delphi runs A, which loads B, and I can debug to my heart's content.

But debugging DLL C is another matter.
It looks like Delphi will only let me debug a DLL loaded directly from the EXE. But this is a DLL loaded from another DLL.

Is there some way to do this? Thanks.

This is Delphi 7.

like image 669
David Dubois Avatar asked Oct 18 '12 22:10

David Dubois


1 Answers

Use the "Debug spawned processes" check box.

In Delphi 7, this is under Tools | Debugger Options | General.

In Delphi XE-2 and XE-5 it is found under Tools | Options | Debugger Options | Embarcadero Debuggers.

like image 126
David Dubois Avatar answered Sep 23 '22 03:09

David Dubois