Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find all the units in my Delphi app?

It's easy enough to find all your external dependencies. Just run the program and open up the Modules info window. But how can I find all my internal dependencies? I know the program keeps a list of all the units, because I've traced my way through the initialization code a time or two. But is there any easy way to access this list from the debugger?

like image 769
Mason Wheeler Avatar asked Apr 08 '09 20:04

Mason Wheeler


2 Answers

The Delphi debugger can show you which units were compiled into a module (exe, dll or package). You can see this in the Modules view (View | Debug Windows | Modules). Click on a module in the upper left pane, and the lower left pane will show all the compilation units that were built into that module. If a particular compilation unit was made up of multiple source files (i.e a .pas and a .inc file), that will be shown too (when you expand the comp unit).

Alternatively, you can have the Delphi compiler show you a list of used .dcus by passing --depends when you compile a project. It will output a .d file with a list of the .dcus (and .dcps) that were required.

like image 69
Chris Hesik Avatar answered Oct 13 '22 02:10

Chris Hesik


Another, but rather cumbersome way, is to generate a map file, it contains a list of all units used in a program.

see also this answer: How can I find all the units in my Delphi app?

like image 20
dummzeuch Avatar answered Oct 13 '22 02:10

dummzeuch