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 giving the corresponding process identity only. By default, an attachment window is displayed. Processes at other Erlang nodes can be attached manually or automatically.

By preference, these functions can be included in module shell_default. By default, they are included in that module.

See Also

int

Summary

Functions

help() -> ok

ia(Pid) -> ok | no_proc

ia(Pid, Function) -> ok | no_proc

ia(X,Y,Z) -> ok | no_proc

ia(X,Y,Z, Function) -> ok | no_proc

Equivalent to iaa/2.

iaa(Flags, Function) -> true

ib(Module, Line) -> ok | {error, break_exists}

ib(Module, Name, Arity) -> ok | {error, function_not_found}

iba(Module, Line, Action) -> ok

ibc(Module, Line, Function) -> ok

ibd(Module, Line) -> ok

ibe(Module, Line) -> ok

ic() -> ok

Equivalent to ini/1.

il() -> ok

im() -> pid()

ini(AbsModule) -> {module, Module} | errorini(AbsModules) -> ok

Equivalent to iq/1.

ip() -> ok

ipb() -> ok

ipb(Module) -> ok

iq(AbsModule) -> ok

ir() -> ok

ir(Module) -> ok

ir(Module, Line) -> ok

ir(Module, Name, Arity) -> ok | {error, function_not_found}

ist(Flag) -> true

iv() -> atom()

Functions

-spec help() -> ok.

help() -> ok

Prints help text.

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

ia(Pid) -> ok | no_proc

Attaches to the debugged process Pid. An Attach Process window is opened for the process.

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

ia(Pid, Function) -> ok | no_proc

Attaches to the debugged process Pid. The interpreter calls spawn(Module, Name, [Pid]) (and ignores the result).

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

ia(X,Y,Z) -> ok | no_proc

Same as ia(Pid), where Pid is the result of calling the shell function pid(X,Y,Z).

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

ia(X,Y,Z, Function) -> ok | no_proc

Same as 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.

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

Equivalent to iaa/2.

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

iaa(Flags, Function) -> true

Sets when and how to attach to a debugged process automatically, see int:auto_attach/2. Function defaults to the standard function used by Debugger.

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

ib(Module, Line) -> ok | {error, break_exists}

Creates a breakpoint at Line in Module.

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

ib(Module, Name, Arity) -> ok | {error, function_not_found}

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.

iba(Module, Line, Action) -> ok

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().

ibc(Module, Line, Function) -> ok

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).

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

ibd(Module, Line) -> ok

Makes the breakpoint at Line in Module inactive.

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

ibe(Module, Line) -> ok

Makes the breakpoint at Line in Module active.

-spec ic() -> ok.

ic() -> ok

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

-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().

Equivalent to ini/1.

-spec il() -> ok.

il() -> ok

Makes a printout of all interpreted modules. Modules are printed together with the full path name of the corresponding source code file.

-spec im() -> pid().

im() -> pid()

Starts a new graphical monitor. 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.

-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().

ini(AbsModule) -> {module, Module} | errorini(AbsModules) -> ok

Interprets the specified module(s). ii/1 interprets the module(s) only at the current node, see int:i/1. ini/1 interprets the module(s) at all known nodes, see int:ni/1.

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

Equivalent to iq/1.

-spec ip() -> ok.

ip() -> ok

Prints the current status of all interpreted processes.

-spec ipb() -> ok.

ipb() -> ok

Prints all existing breakpoints.

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

ipb(Module) -> ok

Prints all existing breakpoints in Module.

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

iq(AbsModule) -> ok

Stops interpreting the specified module. iq/1 stops interpreting the module only at the current node. inq/1 stops interpreting the module at all known nodes.

-spec ir() -> ok.

ir() -> ok

Deletes all breakpoints.

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

ir(Module) -> ok

Deletes all breakpoints in Module.

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

ir(Module, Line) -> ok

Deletes the breakpoint at Line in Module.

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

ir(Module, Name, Arity) -> ok | {error, function_not_found}

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

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

ist(Flag) -> true

Sets how to save call frames in the stack, see int:stack_trace/1.

-spec iv() -> atom().

iv() -> atom()

Returns the current version number of the interpreter. Same as the version number of the Debugger application.