How to debug a DLL called from a DLL in Delphi

10,984

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.

Share:
10,984
David Dubois
Author by

David Dubois

Updated on July 20, 2022

Comments

  • David Dubois
    David Dubois almost 2 years

    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.

  • David Dubois
    David Dubois over 10 years
    This answer was given by James L. in a comment to the original post, but he declined to post it as an answer. I put the answer here to make it easier for future visitors to find it.
  • Server Overflow
    Server Overflow almost 6 years
    @ david - people like you make stackoverflow better!