i (debugger v6.0.3)

Copy Markdown View Source

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

Prints help for using the functions in this module.

Attaches to the debugged process Pid.

Attaches to the debugged process Pid.

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

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

Sets when to attach to a debugged process automatically.

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

Creates a breakpoint at Line in Module.

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

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

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

Makes the breakpoint at Line in Module inactive.

Makes the breakpoint at Line in Module active.

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

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

Makes a printout of all interpreted modules.

Starts a new graphical Monitor window.

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

Stops interpreting the specified module on all known nodes.

Prints the current status of all interpreted processes.

Prints all existing breakpoints.

Prints all existing breakpoints in Module.

Stops interpreting the specified module on the local node.

Deletes all breakpoints in all interpreted modules.

Deletes all breakpoints in Module.

Deletes the breakpoint at Line in Module.

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

Sets how to save call frames in the stack.

Returns the current version of the interpreter (Debugger).

Functions

help() -> ok

Prints help for using the functions in this module.

ia(Pid :: pid()) -> ok | no_proc

Attaches to the debugged process Pid.

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

ia(Pid :: pid(), Function :: {Module, Name}) -> ok | no_proc

Types

Module = module()
Name = atom()

Attaches to the debugged process Pid.

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

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

Types

X = Y = Z = integer()

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

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

Types

X = Y = 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.

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

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.

iaa(Flags :: [init | break | exit], Function :: {Module, Name, Args}) -> true

Types

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.

ib(Module :: module(), Line :: integer()) -> Result

Types

Result = ok | {error, break_exists}

Creates a breakpoint at Line in Module.

ib(Module, Name, Arity) -> Result

Types

Module = module()
Name = atom()
Arity = integer()
Result = ok | {error, function_not_found}

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

iba(Module, Line, Action) -> ok

Types

Module = module()
Line = integer()
Action = enable | disable | delete

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

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

Types

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

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

Makes the breakpoint at Line in Module inactive.

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

Makes the breakpoint at Line in Module active.

ic() -> ok

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

ii(Module :: AbsModules | AbsModule) -> Result

Types

Result = AbsModuleResult | AbsModulesResult
File = file:name_all()
AbsModules = [AbsModule, ...]
AbsModule = Module | File
AbsModuleResult = {module, Module} | error
AbsModulesResult = ok

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

  • If AbsModule :: Module | File, then Result :: {module, Module} | error.

  • If AbsModules :: [AbsModule], then Result :: ok.

See int:i/1 for more information.

il() -> ok

Makes a printout of all interpreted modules.

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

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.

ini(Module :: AbsModules | AbsModule) -> Result

Types

Result = AbsModuleResult | AbsModulesResult
File = file:name_all()
AbsModules = [AbsModule]
AbsModule = Module | File
AbsModuleResult = {module, Module} | error
AbsModulesResult = ok

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

  • If AbsModule :: Module | File, then Result :: {module, Module} | error.

  • If AbsModules :: [AbsModule], then Result :: ok.

See int:ni/1 for more information.

inq(AbsModule :: Module | File) -> ok

Types

Module = module()
File = file:name_all()

Stops interpreting the specified module on all known nodes.

ip() -> ok

Prints the current status of all interpreted processes.

ipb() -> ok

Prints all existing breakpoints.

ipb(Module :: module()) -> ok

Prints all existing breakpoints in Module.

iq(AbsModule :: Module | File) -> ok

Types

Module = module()
File = file:name_all()

Stops interpreting the specified module on the local node.

ir() -> ok

Deletes all breakpoints in all interpreted modules.

ir(Module :: module()) -> ok

Deletes all breakpoints in Module.

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

Deletes the breakpoint at Line in Module.

ir(Module, Name, Arity) -> Result

Types

Module = module()
Name = atom()
Arity = integer()
Result = ok | {error, function_not_found}

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

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

Sets how to save call frames in the stack.

See int:stack_trace/1 for more information.

iv() -> atom()

Returns the current version of the interpreter (Debugger).