IDE Command Line Switches and Options

From RAD Studio
Jump to: navigation, search

Go Up to IDE Reference and Utilities


Describes available options when starting the IDE from the command line.

IDE command line switches

The following options are available when starting the IDE from the command line.

You must precede all options (unless otherwise noted) with either a dash (-) or a slash (/). The options are not case-sensitive. Therefore, the following options are all identical:

-d /d -D /D

Use the IDE command line switches with the startup command for the IDE:

bds.exe

Examples Using BDS.EXE

Code Does this
bds.exe -ns

Starts the RAD Studio IDE with no splash screen.

bds.exe -sd c:\test\source -d c:\test\myprog.exe \mbox{-}td
  • Starts the RAD Studio IDE.
  • Loads c:\test\myprog.exe into the debugger.
  • Uses c:\test\source as the location for the source code while debugging.

The -td and any other argument that appears after the debugger option (-d exename) are used as arguments to c:\test\myprog.exe.

General options for BDS.EXE

Option Description
?

Launches the IDE and displays online help for IDE command-line options.

-- (two hyphens)

Ignore rest of command-line.

ns

No splash screen. Suppresses display of the splash screen during IDE startup.

np

No welcome page. Does not display the welcome page after starting the IDE. np also stands for No Project. Independently of Environment Options Project desktop the last opened project will not be opened

personality

Starts the specified personality of the RAD Studio IDE. The possible values for personality are:

  • Delphi
  • CBuilder
regkey

Alternate registry key. Allows you to specify an alternate base registry key so you can run two copies of the IDE using different configurations. This allows component developers to debug a component at design time by using the IDE as the hosting application, without the debugging IDE interfering by trying to load the component package being developed.

cleanregistryide

Clean the registry entries for the IDE. Deletes the BDS current user registry key and files under appdata in the BDS directory. Caution: You will lose all your projects from the BDS directory, so back them up before starting BDS with this option. This is a last resort, not the first thing you should try when troubleshooting the IDE.

Debugger options

Option Description

attach:%1;%2

Performs a debug attach. Uses %1 as the process ID to attach to and %2 as the event ID for that process. The attach option can be used manually, but is used mostly for Just in Time debugging.

exename       

Loads the specified executable (exename) into the debugger. Any parameters specified after the exename are used as parameters to the program being debugged and are ignored by the IDE. A space is allowed between the -d and the exename.


The following options can only be used with the -d option:

debugger=borwin32

debugger=embwin32

debugger=embwin64

debugger=embmacosx

debugger=embios

debugger=embandroid

Indicates the debugger to use. If this option is omitted, the debugger that was first registered in the IDE is used.

  • borwin32 and embwin32 invoke the Win32 debugger, the standard 32-bit Windows debugger embedded in the IDE.
  • embwin64 invokes the Win64 Debugger (to debug 64-bit Windows applications).
  • embmacosx invokes the OS X Debugger (to debug OS X apps or iOS Simulator apps)
  • embios invokes the iOS Debugger (to debug apps on the iOS Device)
  • embandroid invokes the Android debugger (to debug apps on the Android Device)

l

(Lowercase L) Assembler startup. Do not execute startup code. Must be used with the -d option. Normally, when you specify the -d option, the debugger attempts to run the process to either main or WinMain. When -l is specified, the process is merely loaded and no startup code is executed.

sd directories

Source Directories. Must be used with the -d option. The argument is either a single directory or a semicolon delimited list of directories which are used as the Debug Source Path setting (can also be set using the Project > Options > Debugger page). No space is allowed between sd and the directory list argument.

hostname

Remote debugger host name. Must be used with the -d option. A remote debug session is initiated using the specified host name as the remote host where debugging is performed. The remote debug server program must be running on the remote host.

workingdirectory

Working directory for your debug session. Corresponds to "Working directory" setting on the Load Process dialog box.

Project options

Option Description

filename

(No preceding dash) Loads the specified filename in the IDE. It can be a project, project group, or a single file.

b

AutoBuild. Must be used with the filename option. When the -b option is specified, the project or project group is built automatically when the IDE starts. Any hints, errors, or warnings are then saved to a file. Then the IDE exits. This facilitates doing builds in batch mode from a batch file. The Error Level is set to 0 for successful builds and 1 for failed builds. By default, the output file has the same name as the filename specified with the file extension changed to .err. This can be overridden using the -o option.

m

AutoMake. Same as AutoBuild, but a make is performed rather than a full build.

outputfile

Output file. Must be used with the -b or -m option. When the -o option is specified, any hints, warnings, or errors are written to the file specified instead of the default file.