The Erlang interpreter provides mechanisms for breakpoints and
stepwise execution of code. It is mainly intended to be used by
the Debugger, see Debugger User's Guide and
From the shell, it is possible to:
By attaching to a process executing interpreted code, it
is possible to examine variable bindings and order stepwise
execution. This is done by sending and receiving information
to/from the process via a third process, called the meta process.
It is possible to implement your own attached process. See
The interpreter depends on the Kernel, STDLIB and GS applications, which means modules belonging to any of these applications are not allowed to be interpreted as it could lead to a deadlock or emulator crash. This also applies to modules belonging to the Debugger application itself.
Breakpoints are specified on a line basis. When a process executing code in an interpreted module reaches a breakpoint, it will stop. This means that that a breakpoint must be set at an executable line, that is, a line of code containing an executable expression.
A breakpoint have a status, a trigger action and may have a
condition associated with it. The status is either active
or inactive. An inactive breakpoint is ignored. When a
breakpoint is reached, the trigger action specifies if
the breakpoint should continue to be active (enable), if
it should become inactive (disable), or if it should be
removed (delete). A condition is a tuple
By default, a breakpoint is active, has trigger action
Interprets the specified module(s).
A module may be given by its module name (atom) or by its
file name. If given by its module name, the object code
If given by its file name, the file name may include a path
and the
The interpreter needs both the source code and the object
code, and the object code must include debug
information. That is, only modules compiled with the option
The functions returns
The argument may also be a list of modules/file names, in
which case the function tries to interpret each module as
specified above. The function then always returns
Stops interpreting the specified module.
As for
Returns a list with all interpreted modules.
Returns the source code file name
Checks if a module is possible to interpret. The module can
be given by its module name
The function returns
The function returns
Note that the function can return
Gets and sets when and how to automatically attach to a
process executing code in interpreted modules.
When the specified event occurs, the function
spawn(Module, Name, [Pid | Args])
Gets and sets how to save call frames in the stack. Saving call frames makes it possible to inspect the call chain of a process, and is also used to emulate the stack trace if an error (an exception of class error) occurs.
Creates a breakpoint at
Deletes the breakpoint located at
Creates a breakpoint at the first line of every clause of
the
Deletes the breakpoints at the first line of every clause of
the
Deletes all breakpoints, or all breakpoints in
Makes the breakpoint at
Makes the breakpoint at
Sets the trigger action of the breakpoint at
Sets the conditional test of the breakpoint at
Retrieves the binding of
Gets all breakpoints, or all breakpoints in
Gets information about all processes executing interpreted code.
Clears information about processes executing interpreted code by removing all information about terminated processes.
Resume process execution for