当前位置导航:炫浪网>>网络学院>>编程开发>>C++教程>>C++ Builder教程

BCB/Delphi未公开的命令行开关

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.

BCB/Delphi的IDE支持某些命令行开关。Delphi 5公开了其中的一部分,并增加了很多新的开关。对于那些使用更早期版本的用户,下表中展示了这些开关的版本可用性。

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


值得注意的是所有这些命令行开关都是大小写敏感的,使用时请加上前缀-或/。


 


Undocumented command-line switches


未公开的命令行开关






ns

Delphi 2 and later. No splash screen. This suppresses display of the splash screen during IDE startup.


Delphi2 以上。禁用启动时的splash屏幕。



hm

Delphi 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.


Delphi 2以上。堆监视器。在IDE的标题栏上显示由内存管理器分配的内存数量。显示已分配的内存块和字节数(参见下面的截图)。并在IDE空闲时更新信息。



hv

Delphi 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.


Delphi 3以上。堆校验。对由内存管理器分配的内存执行校验。在堆中发现错误后,在IDE的标题栏上显示错误信息。



attach

Delphi 4 and later. Attach to running process. This command-line is used to make Delphi 4 a JIT debugger on Windows 95/98/NT.


Delphi 4以上。附加至系统运行中的进程。此开关用于将Delphi 4作为Windows 95、98、NT下的JIT(实时)调试器时使用


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

注:堆校验实际上调用了RTL函数GetHeapStatus。出错代码在RTL的头文件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.


 

此外您可以手动编辑注册表下的\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\WindowsNT\\CurrentVersion\\AeDebug 下的键值Debugger设置为 相应的版本和路径。如:C:\\Delphi 4.0\\Delphi32.Exe /Attach:%ld,或者D:\\Borland\\CBuilder6\\Bin\\bordbg61.exe -aeargs %ld %ld,使得IDE成为JIT调试器。4.0后的版本在启动时都会检查这个键值并提交相应的设置,除非您以前明确停止此项功能。


 

注:这些开关项同样使用与BCB。

相关内容
赞助商链接