Undocumented Command-Line Switches

The Delphi IDE supports a number of command-line switches. The release of Delphi 5 documented a number of them, and added many new ones. For those people with earlier versions, the table below shows a list of what is available.

Note that these command-line switches are case-insensitive and can be prefixed with either - or /.

Undocumented command-line switches

nsDelphi 2 and later. No splash screen. This suppresses display of the splash screen during IDE startup.
hmDelphi 2 and later. Heap Monitor. Displays information in the IDE title bar regarding the amount of memory allocated using the memory manager. Displays the number of blocks and bytes allocated (visible in the screenshot below). Information gets updated when the IDE is idle.
hvDelphi 3 and later. Heap Verify. Performs validation of memory allocated using the memory manager. Displays error information in the IDE title bar if errors are found in the heap.
attachDelphi 4 and later. Attach to running process. This command-line is used to make Delphi 4 a JIT debugger on Windows 95/98/NT.

The effect of the heap monitor switch (-hm) can be seen in the screenshot below:

The IDE heap monitor

Note that the heap verification is performed through a call to the RTL routine GetHeapStatus. The error codes are described in the RTL include file GETMEM.INC.

Also note that you can set up the IDE as a JIT debugger in the registry under \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\AeDebug by setting the Debugger value to C:\Delphi 4.0\Delphi32.Exe /Attach:%ld, specifying the appropriate path and version of the IDE. Later versions of the IDE check this value on startup, and offer to set it for you, unless you have previously told them not to.