0

I'm using Delphi 10.4.

I have a Delphi executable XXX.exe and a Delphi package BBB.Bpl, which is loaded by XXX with LoadPackage('BBB.Bpl').

Both are separate projects in Delphi.

I open the BBB.Bpl project, indicating my XXX.exe as the Host application. After a build of BBB, blue dots on the right side of the editor are visible, and breakpoints can be set in the BBB code.

When I start the BBB project with eg. F9, the XXX application performs the LoadPackage procedure without fail, and executes the commands from the BBB without fail. But, the breakpoints in the BBB code are disabled, also the blue dots are not visible. The breakpoints in the code of the XXX application are working fine.

I Googled a lot about this, nothing was helpful.

I tried to check and add more search paths, lots of compiler/linker options (Debug information = true, etc), but I am not able to debug the Bpl's source code.

Can anyone please give me some hints?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • 1
    Are you sure that you are loading the exact copy of the .BPL you have in your IDE? Are you using a fully qualified path to load the .BPL? If not, it's possible that the actual .BPL file you are loading is another one than what you think... – HeartWare Nov 18 '21 at 12:25
  • I have only one BPL on my computer. If I change the BPL code, this changes are compiled an executed. – Michael Haitz Nov 18 '21 at 12:30

1 Answers1

1

you should attach it(bpl) to main app when the app was running as below.

enter image description here

Bart
  • 124
  • 7
  • 1
    Thank you. I used the Run | Load Process... | Local -> Load dialog to run my host applicatin and it worked. – Michael Haitz Nov 18 '21 at 12:59
  • This should not be necessary. By setting XXX as the Host for BBB, and then running BBB, the IDE will run XXX and detect its loading of BBB at runtime, and *should* enable debugging of BBB automatically. Typically, this breaks if the IDE can't find BBB's debug info (ie, via TDS file) and/or source code. – Remy Lebeau Nov 18 '21 at 15:57