Debugging in Delphi 11 with Packages

Hi All,

26+ year Delphi user in Brisbane but new poster. Absolutely love Delphi and recent updates are getting better but we still have serious issues we can not get past.

Does anyone successfully use packages in D11 and are you able to debug into dll projects?

We have a 25-year project that is stuck in D10.2 because each Delphi upgrade has had serious issues and the last issue in D11 is that we can not step into DLL code when we use packages. But if we don’t use packages then we have issues with our threads being able to synch back into the main thread.

The issue is reported with a sample app at Log in - Embarcadero Technologies (please upvote if you also have this issue).

The project is one exe and around 20 DLLs and around 5 million lines of compiled code. They share classes as messages. Over 25 years our uses clauses have become a mess and we’re dealing with that but I’m just curious if anyone has successfully debugged this size project in D11.



My main project (FinalBuilder) is a few exe projects (that use runtime packages), around 100 runtime packages and a couple of com dll’s (not regular dll’s).

I’ve had all sorts of issues with the debugger over the years… currently trying to narrow one down in 11.1 where it appears like I cannot set breakpoints in one particular unit.

That said, I downloaded your sample project and ran it using 11.1 - I am able to step into the dll with both 32 bit and 64 bit.

I would highly recommend cleaning up the uses clause etc before migrating it to 11.1 - that way you still have a known working environment to use.

Also since this is a project that has been migrated through many delphi versions (I assume, given it’s age), it’s likely there is a lot of debris in the dproj files.

I would recommend using Project Magician to clean up and normalise the dproj files for a start (the post mentions D11 but the installer supports many delphi versions).

Also worth using a tool like the one attached in this thread on delphi praxis - by the same author as project magician - tldr; it fixes up unit namespace references in the uses clause, so SysUtils becomes System.SysUtils - this is worth doing as it can improve compilation speed (a tiny bit) as the compiler doesn’t need to use the unit namespace alias lookup when it doesn’t find the unit.

Then finally, a uses clause cleaner - CnPack (free) has one (never used it) and Pascal Analyzer (paid) has one.

If your code base is 25 years old then it could likely benefit from some static analysis that Pascal Analyzer or FixInsight can provide - I have used both tools in recent years and both have found bugs or potential bugs and performance improvements - we probably all know about using const for string parameters but these tools will find those methods you missed :wink:


1 Like

Hi VIncent,

Thanks so much for the pointers. We’re committed to get this running in D11 and we’ll start hitting these things to see if we can get it all going. I’ll install D11.1 and see how we go, because the issue was not marked as resolved I was not hopeful, but perhaps they have fixed it.

All the best


Sometimes it takes them a while to update all the issues that were fixed, they have an internal version of jira where the internal and public issues are linked… they run a sync process to update the public ones. Not sure if they have done that yet.

Also with debugger issues… sometimes they might fix (or break) things without realising :smirk:

lol - it got marked as resolved last night!

Still, I’ve been having fun cleaning up the users clauses anyway.

1 Like