16.3 Commands

16.3.1. Getting help
16.3.2. Accessing the debugger state

A debugger command is a single line of input. It starts with a command name, which is followed by arguments depending on this name. Examples:

goto 1000
set arguments arg1 arg2

A command name can be truncated as long as there is no ambiguity. For instance, go 1000 is understood as goto 1000, since there are no other commands whose name starts with go. For the most frequently used commands, ambiguous abbreviations are allowed. For instance, r stands for run even though there are others commands starting with r. You can test the validity of an abbreviation using the help command.

If the previous command has been successful, a blank line (typing just RET) will repeat it.

16.3.1 Getting help

The Objective Caml debugger has a simple on-line help system, which gives a brief description of each command and variable.


Print the list of commands.

help command

Give help about the command command.

help set variable, help show variable

Give help about the variable variable. The list of all debugger variables can be obtained with help set.

help info topic

Give help about topic. Use help info to get a list of known topics.

16.3.2 Accessing the debugger state

set variable value

Set the debugger variable variable to the value value.

show variable

Print the value of the debugger variable variable.

info subject

Give information about the given subject. For instance, info breakpoints will print the list of all breakpoints.