i — debugger v5.4

Search documentation of debugger

# View Source i (debugger v5.4)

Debugger/Interpreter Interface.

The `i` module provides short forms for some of the functions used by the graphical Debugger and some of the functions in module `int`, the Erlang interpreter.

This module also provides facilities for displaying status information about interpreted processes and break points.

It is possible to attach to interpreted processes by only giving the corresponding process identity. By default, an attachment window is displayed. Processes at other Erlang nodes can be attached manually or automatically.

The functions in this module are defined in the Erlang shell. That is, they can be called without the `i:` prefix. For example:

    1> ii(t).
    {module,t}
    2> iaa([init]).
    true

# Summary

## Functions

help()

Prints help for using the functions in this module.

ia(Pid)

Attaches to the debugged process `Pid`.

ia(Pid, Function)

Attaches to the debugged process `Pid`.

ia(X, Y, Z)

Equivalent to `ia(Pid)`, where `Pid` is the result of calling the shell function `pid(X, Y, Z)`.

ia(X, Y, Z, Function)

Equivalent to `ia(Pid, Function)`, where `Pid` is the result of calling the shell function `pid(X, Y, Z)`.

iaa(Flags)

Sets when to attach to a debugged process automatically.

iaa(Flags, Function)

Sets when and how to attach to a debugged process automatically.

ib(Module, Line)

Creates a breakpoint at `Line` in `Module`.

ib(Module, Name, Arity)

Creates breakpoints at the first line of every clause of function `Module:Name/Arity`.

iba(Module, Line, Action)

Sets the trigger action of the breakpoint at `Line` in `Module` to `Action`.

ibc(Module, Line, Function)

Sets the conditional test of the breakpoint at `Line` in `Module` to `Function`.

ibd(Module, Line)

Makes the breakpoint at `Line` in `Module` inactive.

ibe(Module, Line)

Makes the breakpoint at `Line` in `Module` active.

ic()

Clears information about processes executing interpreted code by removing all information about terminated processes.

ii(Module)

Interprets the specified module(s) on the local node.

il()

Makes a printout of all interpreted modules.

im()

Starts a new graphical Monitor window.

ini(Module)

Interprets the specified module(s) on all known nodes.

inq(AbsModule)

Stops interpreting the specified module on all known nodes.

ip()

Prints the current status of all interpreted processes.

ipb()

Prints all existing breakpoints.

ipb(Module)

Prints all existing breakpoints in `Module`.

iq(AbsModule)

Stops interpreting the specified module on the local node.

ir()

Deletes all breakpoints in all interpreted modules.

ir(Module)

Deletes all breakpoints in `Module`.

ir(Module, Line)

Deletes the breakpoint at `Line` in `Module`.

ir(Module, Name, Arity)

Deletes the breakpoints at the first line of every clause of function `Module:Name/Arity`.

ist(Flag)

Sets how to save call frames in the stack.

iv()

Returns the current version of the interpreter (Debugger).

# Functions

Link to this function

# help()

View Source

    -spec help() -> ok.

Prints help for using the functions in this module.

Link to this function

# ia(Pid)

View Source

    -spec ia(Pid) -> ok | no_proc when Pid :: pid().

Attaches to the debugged process `Pid`.

An "Attach Process" window is opened for the process.

Link to this function

# ia(Pid, Function)

View Source

    -spec ia(Pid, Function) -> ok | no_proc
                when Pid :: pid(), Function :: {Module, Name}, Module :: module(), Name :: atom().

Attaches to the debugged process `Pid`.

The interpreter calls `spawn(Module, Name, [Pid])` (and ignores the result).

Link to this function

# ia(X, Y, Z)

View Source

    -spec ia(X, Y, Z) -> ok | no_proc when X :: integer(), Y :: integer(), Z :: integer().

Equivalent to `ia(Pid)`, where `Pid` is the result of calling the shell function `pid(X, Y, Z)`.

Link to this function

# ia(X, Y, Z, Function)

View Source

    -spec ia(X, Y, Z, Function) -> ok | no_proc
                when
                    X :: integer(),
                    Y :: integer(),
                    Z :: integer(),
                    Function :: {Module, Name},
                    Module :: module(),
                    Name :: atom().

Equivalent to `ia(Pid, Function)`, where `Pid` is the result of calling the shell function `pid(X, Y, Z)`.

An attached process is expected to call the unofficial function `int:attached(Pid)` and to be able to handle messages from the interpreter. For an example, see `dbg_wx_trace.erl`.

Link to this function

# iaa(Flags)

View Source

    -spec iaa(Flags) -> true when Flags :: [init | break | exit].

Sets when to attach to a debugged process automatically.

Debugger supplies a function that opens "Attach Process" window for the process.

See int:auto_attach/2 for more information.

Link to this function

# iaa(Flags, Function)

View Source

    -spec iaa(Flags, Function) -> true
                 when
                     Flags :: [init | break | exit],
                     Function :: {Module, Name, Args},
                     Module :: module(),
                     Name :: atom(),
                     Args :: [term()].

Sets when and how to attach to a debugged process automatically.

See int:auto_attach/2 for more information.

Link to this function

# ib(Module, Line)

View Source

    -spec ib(Module, Line) -> ok | {error, break_exists} when Module :: module(), Line :: integer().

Creates a breakpoint at `Line` in `Module`.

Link to this function

# ib(Module, Name, Arity)

View Source

    -spec ib(Module, Name, Arity) -> ok | {error, function_not_found}
                when Module :: module(), Name :: atom(), Arity :: integer().

Creates breakpoints at the first line of every clause of function `Module:Name/Arity`.

Link to this function

# iba(Module, Line, Action)

View Source

    -spec iba(Module, Line, Action) -> ok
                 when Module :: module(), Line :: integer(), Action :: enable | disable | delete.

Sets the trigger action of the breakpoint at `Line` in `Module` to `Action`.

Link to this function

# ibc(Module, Line, Function)

View Source

    -spec ibc(Module, Line, Function) -> ok
                 when Module :: module(), Line :: integer(), Function :: {Module, Name}, Name :: atom().

Sets the conditional test of the breakpoint at `Line` in `Module` to `Function`.

The conditional test is performed by calling `Module:Name(Bindings)`, where `Bindings` is the current variable bindings. The function must return `true` (break) or `false` (do not break). To retrieve the value of a variable `Var` use int:get_binding(Var, Bindings).

Link to this function

# ibd(Module, Line)

View Source

    -spec ibd(Module, Line) -> ok when Module :: module(), Line :: integer().

Makes the breakpoint at `Line` in `Module` inactive.

Link to this function

# ibe(Module, Line)

View Source

    -spec ibe(Module, Line) -> ok when Module :: module(), Line :: integer().

Makes the breakpoint at `Line` in `Module` active.

Link to this function

# ic()

View Source

    -spec ic() -> ok.

Clears information about processes executing interpreted code by removing all information about terminated processes.

Link to this function

# ii(Module)

View Source

    -spec ii(AbsModule) -> {module, Module} | error
                when AbsModule :: Module | File, Module :: module(), File :: file:name_all();
            (AbsModules) -> ok
                when
                    AbsModules :: [AbsModule],
                    AbsModule :: Module | File,
                    Module :: module(),
                    File :: file:name_all().

Interprets the specified module(s) on the local node.

See `int:i/1` for more information.

Link to this function

# il()

View Source

    -spec il() -> ok.

Makes a printout of all interpreted modules.

Modules are printed together with the full path name of the corresponding source code file.

Link to this function

# im()

View Source

    -spec im() -> pid().

Starts a new graphical Monitor window.

This is the Monitor window, the main window of Debugger. All the Debugger and interpreter functionality is accessed from the Monitor window. This window displays the status of all processes that have been or are executing interpreted modules.

Link to this function

# ini(Module)

View Source

    -spec ini(AbsModules) -> ok
                 when
                     AbsModules :: [AbsModule],
                     AbsModule :: Module | File,
                     Module :: module(),
                     File :: file:name_all();
             (AbsModule) -> {module, Module} | error
                 when AbsModule :: Module | File, Module :: module(), File :: file:name_all().

Interprets the specified module(s) on all known nodes.

See `int:ni/1` for more information.

Link to this function

# inq(AbsModule)

View Source

    -spec inq(AbsModule) -> ok when AbsModule :: Module | File, Module :: module(), File :: file:name_all().

Stops interpreting the specified module on all known nodes.

Link to this function

# ip()

View Source

    -spec ip() -> ok.

Prints the current status of all interpreted processes.

Link to this function

# ipb()

View Source

    -spec ipb() -> ok.

Prints all existing breakpoints.

Link to this function

# ipb(Module)

View Source

    -spec ipb(Module) -> ok when Module :: module().

Prints all existing breakpoints in `Module`.

Link to this function

# iq(AbsModule)

View Source

    -spec iq(AbsModule) -> ok when AbsModule :: Module | File, Module :: module(), File :: file:name_all().

Stops interpreting the specified module on the local node.

Link to this function

# ir()

View Source

    -spec ir() -> ok.

Deletes all breakpoints in all interpreted modules.

Link to this function

# ir(Module)

View Source

    -spec ir(Module) -> ok when Module :: module().

Deletes all breakpoints in `Module`.

Link to this function

# ir(Module, Line)

View Source

    -spec ir(Module, Line) -> ok when Module :: module(), Line :: integer().

Deletes the breakpoint at `Line` in `Module`.

Link to this function

# ir(Module, Name, Arity)

View Source

    -spec ir(Module, Name, Arity) -> ok | {error, function_not_found}
                when Module :: module(), Name :: atom(), Arity :: integer().

Deletes the breakpoints at the first line of every clause of function `Module:Name/Arity`.

Link to this function

# ist(Flag)

View Source

    -spec ist(Flag) -> true when Flag :: all | no_tail | false.

Sets how to save call frames in the stack.

See int:stack_trace/1 for more information.

Link to this function

# iv()

View Source

    -spec iv() -> atom().

Returns the current version of the interpreter (Debugger).