16.2 Invocation

16.2.1. Starting the debugger
16.2.2. Exiting the debugger

16.2.1 Starting the debugger

The Objective Caml debugger is invoked by running the program ocamldebug with the name of the bytecode executable file as first argument:

ocamldebug [options] program [arguments]

The arguments following program are optional, and are passed as command-line arguments to the program being debugged. (See also the set arguments command.)

The following command-line options are recognized:

-I directory

Add directory to the list of directories searched for source files and compiled files. (See also the directory command.)

-s socket

Use socket for communicating with the debugged program. See the description of the command set socket (section 16.8.6) for the format of socket.

-c count

Set the maximum number of simultaneously live checkpoints to count.

-cd directory

Run the debugger program from the working directory directory, instead of the current directory. (See also the cd command.)

-emacs

Tell the debugger it is executed under Emacs. (See section 16.10 for information on how to run the debugger under Emacs.)

-version

Print version and exit.

16.2.2 Exiting the debugger

The command quit exits the debugger. You can also exit the debugger by typing an end-of-file character (usually ctrl-D).

Typing an interrupt character (usually ctrl-C) will not exit the debugger, but will terminate the action of any debugger command that is in progress and return to the debugger command level.