1

My application dynamically loads BPL packages at runtime by using the LoadPackage function.

LoadPackage('.\MyPackage.bpl');

I need to set breakpoints for debugging the code of the MyPackage project.

I've set both executable and package project build configuration to "Debug" but each time I run the application, all break points that I've placed into MyPackage's code doesn't work and appear as follows:

---

Further informations:

I've set the executable as "Host application" for the dynamic package:

enter image description here

enter image description here

Fabrizio
  • 7,603
  • 6
  • 44
  • 104
  • 7
    In the spirit of asking the obvious questions first, 1) did you make sure that the packages you're loading were built with debug info, 2) did you make sure that the packages you're loading have that debug info located somewhere the IDE can find it, and 3) did you check the breakpoints *after* `LoadPackage` has run? – Mason Wheeler Mar 07 '19 at 18:12
  • Ensure debug info also enabled in the linker settings. In case of win64 debugging, it can be a real hassle: https://stackoverflow.com/questions/51098092/is-there-a-limit-to-the-delphi-win64-debugger-loading-symbols – H.Hasenack Mar 08 '19 at 19:20
  • Did you make sure your host project is configured to be compiled with ‘runtime packages’? – R. Hoek Sep 29 '19 at 20:34

1 Answers1

0

Your host application is located on the W: Drive. Is this some sort of mapped drive?

I had issues with not beeing able to load debug symbols when using the mapped drive letter as "Output Path" instead of the full UNC Path (eg. \myserver\shared\ instead of W:).

You can see the path Delphi needs in the list of loaded modules if you stop in the main application after loading your package.

But keep in mind: Delphi 2007 has many Debug-Symbol-Not-correctly-loaded-bugs. Most of them appearing and disappearing from time to time with no change of anything.

Bananenkopp
  • 101
  • 2