debugger

v6.0.3

debugger

The Erlang Debugger for debugging and testing of Erlang programs.

Summary

Functions

quick(Module, Name, Args)

Debugs a single process.

start()

Starts Debugger.

start(ModeOrFile)

Starts Debugger.

start(Mode, File)

Starts Debugger.

Functions

quick(Module, Name, Args)

-spec quick(Module, Name, Args) -> term() when Module :: atom(), Name :: atom(), Args :: [term()].

Debugs a single process.

The module Module is interpreted and apply(Module, Name, Args) is called. This opens an "Attach Process" window. For details, see the User's Guide.

start()

-spec start() -> term().

Starts Debugger.

Started by this function, Debugger interprets code on all known nodes.

start(ModeOrFile)

-spec start(Mode) -> term() when Mode :: local | global | wx;
           (File) -> term() when File :: string().

Starts Debugger.

If ModeOrFile is a string, it is assumed to be the name of a file, and Debugger tries to load its settings from this file. For details about settings, see the User's Guide.

If ModeOrFile is atom local, Debugger interprets code only at the current node. If ModeOrFile is global, Debugger interprets code on all known nodes.

start(Mode, File)

-spec start(Mode, File) -> term() when Mode :: local | global, File :: string().

Starts Debugger.

Debugger tries to load its settings from the file named by File. For details about settings, see the User's Guide.

If Mode is local, Debugger interprets code only on the current node. If Mode is global, Debugger interprets code on all known nodes.

i

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

help()

-spec help() -> ok.

Prints help for using the functions in this module.

ia(Pid)

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

Attaches to the debugged process Pid.

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

ia(Pid, Function)

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

ia(X, Y, Z)

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

ia(X, Y, Z, Function)

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

iaa(Flags)

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

iaa(Flags, Function)

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

ib(Module, Line)

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

Creates a breakpoint at Line in Module.

ib(Module, Name, Arity)

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

iba(Module, Line, Action)

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

ibc(Module, Line, Function)

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

ibd(Module, Line)

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

Makes the breakpoint at Line in Module inactive.

ibe(Module, Line)

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

Makes the breakpoint at Line in Module active.

ic()

-spec ic() -> ok.

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

ii(Module)

-spec ii(AbsModules | AbsModule) -> Result
            when
                AbsModules :: [AbsModule, ...],
                AbsModule :: Module | File,
                Module :: module(),
                File :: file:name_all(),
                Result :: AbsModuleResult | AbsModulesResult,
                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()

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

im()

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

ini(Module)

-spec ini(AbsModules | AbsModule) -> Result
             when
                 AbsModules :: [AbsModule],
                 AbsModule :: Module | File,
                 Module :: module(),
                 File :: file:name_all(),
                 Result :: AbsModuleResult | AbsModulesResult,
                 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)

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

Stops interpreting the specified module on all known nodes.

ip()

-spec ip() -> ok.

Prints the current status of all interpreted processes.

ipb()

-spec ipb() -> ok.

Prints all existing breakpoints.

ipb(Module)

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

Prints all existing breakpoints in Module.

iq(AbsModule)

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

Stops interpreting the specified module on the local node.

ir()

-spec ir() -> ok.

Deletes all breakpoints in all interpreted modules.

ir(Module)

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

Deletes all breakpoints in Module.

ir(Module, Line)

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

Deletes the breakpoint at Line in Module.

ir(Module, Name, Arity)

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

ist(Flag)

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

iv()

-spec iv() -> atom().

Returns the current version of the interpreter (Debugger).

int

Interpreter Interface.

The Erlang interpreter provides mechanisms for breakpoints and stepwise execution of code. It is primarily intended to be used by Debugger; see the Users's Guide for Debugger and module debugger.

The following can be done from the shell:

Specify the modules to be interpreted.

Specify breakpoints.

Monitor the current status of all processes executing code in interpreted modules, also processes at other Erlang nodes.

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 through a third process, called the meta process. You can implement your own attached process. See int.erl for available functions and dbg_wx_trace.erl for possible messages.

The interpreter depends on the Kernel, STDLIB, and WX applications. This means that 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.

Breakpoints

Breakpoints are specified on a line basis. When a process executing code in an interpreted module reaches a breakpoint, it stops. This means that a breakpoint must be set at an executable line, that is, a code line containing an executable expression.

A breakpoint has the following:

A status, which is active or inactive. An inactive breakpoint is ignored.

A trigger action. When a breakpoint is reached, the trigger action specifies if the breakpoint is to continue as active (enable), or to become inactive (disable), or to be removed (delete).

Optionally an associated condition. A condition is a tuple {Module,Name}. When the breakpoint is reached, Module:Name(Bindings) is called. If it evaluates to true, execution stops. If it evaluates to false, the breakpoint is ignored. Bindings contains the current variable bindings. To retrieve the value for a specified variable use get_binding/2.

By default, a breakpoint is active, has trigger action enable, and has no associated condition. For details about breakpoints, see Breakpoints and Break Dialog Windows in the User's Guide for Debugger.

Summary

Functions

action_at_break(Module, Line, Action)

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

all_breaks()

Gets all breakpoints.

all_breaks(Module)

Gets all breakpoints in module Module.

auto_attach()

Gets how to attach automatically to a process executing code in interpreted modules.

auto_attach/1

Disables auto attach.

auto_attach(Flags, Function)

Sets when and how to attach automatically to a process executing code in interpreted modules.

break(Module, Line)

Creates a breakpoint at Line in Module.

break_in(Module, Name, Arity)

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

clear()

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

continue(Pid)

Resumes process execution for Pid.

continue(X, Y, Z)

Resumes process execution for c:pid(X, Y, Z).

del_break_in(Module, Name, Arity)

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

delete_break(Module, Line)

Deletes the breakpoint at Line in Module.

disable_break(Module, Line)

Makes the breakpoint at Line in Module inactive.

enable_break(Module, Line)

Makes the breakpoint at Line in Module active.

file(Module)

Returns the source code filename File for an interpreted module Module.

get_binding(Var, Bindings)

Retrieves the binding of Var from Bindings.

i(AbsMods)

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

interpretable(AbsModule)

Checks if a module can be interpreted.

interpreted()

Returns a list with all interpreted modules.

n(AbsModule)

Stops interpreting the specified module on the local node.

ni(AbsMods)

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

nn(AbsModule)

Stops interpreting the specified module on all known nodes.

no_break()

Deletes all breakpoints.

no_break(Module)

Deletes all breakpoints in Module.

snapshot()

Gets information about all processes executing interpreted code.

stack_trace()

Gets how to save call frames in the stack.

stack_trace(Flag)

Sets how to save call frames in the stack.

test_at_break(Module, Line, Function)

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

Functions

action_at_break(Module, Line, Action)

-spec action_at_break(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.

all_breaks()

-spec all_breaks() -> [Break]
                    when
                        Break :: {Point, Options},
                        Point :: {Module, Line},
                        Module :: module(),
                        Line :: integer(),
                        Options :: [Status | Trigger | null | Cond],
                        Status :: active | inactive,
                        Trigger :: enable | disable | delete,
                        Cond :: null | Function,
                        Function :: {Module, Name},
                        Name :: atom().

Gets all breakpoints.

all_breaks(Module)

-spec all_breaks(Module) -> [Break]
                    when
                        Break :: {Point, Options},
                        Point :: {Module, Line},
                        Module :: module(),
                        Line :: integer(),
                        Options :: [Status | Trigger | null | Cond],
                        Status :: active | inactive,
                        Trigger :: enable | disable | delete,
                        Cond :: null | Function,
                        Function :: {Module, Name},
                        Name :: atom().

Gets all breakpoints in module Module.

auto_attach()

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

Gets how to attach automatically to a process executing code in interpreted modules.

See auto_attach/2 for the meaning of the possible values in Flags.

auto_attach/1

-spec auto_attach(false) -> term().

Disables auto attach.

auto_attach(Flags, Function)

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

Sets when and how to attach automatically to a process executing code in interpreted modules.

By default when the interpreter is started, automatic attach is disabled.

If Flags is an empty list, automatic attach is disabled.

Otherwise Flags should be a list containing at least one of the following flags:

init - Attach when a process for the first time calls an interpreted function.

break - Attach whenever a process reaches a breakpoint.

exit - Attach when a process terminates.

When the specified event occurs, the function Function is called as:

spawn(Module, Name, [Pid | Args])

Pid is the pid of the process executing interpreted code.

break(Module, Line)

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

Creates a breakpoint at Line in Module.

break_in(Module, Name, Arity)

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

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

clear()

-spec clear() -> ok.

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

continue(Pid)

-spec continue(Pid :: pid()) -> ok | {error, not_interpreted}.

Resumes process execution for Pid.

continue(X, Y, Z)

-spec continue(X, Y, Z) -> ok | {error, not_interpreted}
                  when X :: integer(), Y :: integer(), Z :: integer().

Resumes process execution for c:pid(X, Y, Z).

del_break_in(Module, Name, Arity)

-spec del_break_in(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.

delete_break(Module, Line)

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

Deletes the breakpoint at Line in Module.

disable_break(Module, Line)

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

Makes the breakpoint at Line in Module inactive.

enable_break(Module, Line)

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

Makes the breakpoint at Line in Module active.

file(Module)

-spec file(Module) -> File | {error, not_loaded} when Module :: module(), File :: file:filename_all().

Returns the source code filename File for an interpreted module Module.

get_binding(Var, Bindings)

-spec get_binding(Var, Bindings) -> {value, Value} | unbound
                     when Var :: atom(), Bindings :: term(), Value :: term().

Retrieves the binding of Var from Bindings.

This function is intended to be used by the conditional function of a breakpoint.

i(AbsMods)

-spec i(AbsModules | AbsModule) -> Result
           when
               AbsModules :: [AbsModule, ...],
               AbsModule :: Module | File,
               Module :: module(),
               File :: file:name_all(),
               Result :: AbsModuleResult | AbsModulesResult,
               AbsModuleResult :: {module, Module} | error,
               AbsModulesResult :: ok.

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

A module can be specified by its module name (atom) or filename.

If specified by its module name, the object code Module.beam is searched for in the current path. The source code Module.erl is searched for first in the same directory as the object code, then in an src directory next to it.

If specified by its filename, the filename can include a path and the .erl extension can be omitted. The object code Module.beam is searched for first in the same directory as the source code, then in an ebin directory next to it, and then in the current path.

Note

The interpreter requires both the source code and the object code. The object code must include debug information, that is, only modules compiled with option debug_info can be interpreted.

The functions returns {module,Module} if the module was interpreted, otherwise error is returned.

The argument can also be a list of modules or filenames, in which case the function tries to interpret each module as specified earlier. The function then always returns ok, but prints some information to stdout if a module cannot be interpreted.

interpretable(AbsModule)

-spec interpretable(AbsModule) -> true | {error, Reason}
                       when
                           AbsModule :: Module | File,
                           Module :: module(),
                           File :: file:name_all(),
                           Reason :: no_src | no_beam | no_debug_info | badarg | {app, App},
                           App :: atom().

Checks if a module can be interpreted.

The module can be specified by its module name Module or its source filename File. If specified by a module name, the module is searched for in the code path.

The function returns true if all of the following apply:

Both source code and object code for the module is found.

The module has been compiled with option debug_info set.

The module does not belong to any of the applications Kernel, STDLIB, WX, or Debugger.

The function returns {error,Reason} if the module cannot be interpreted. Reason can have the following values:

no_src - No source code is found. It is assumed that the source code and object code are located either in the same directory, or in src and ebin directories next to each other.

no_beam - No object code is found. It is assumed that the source code and object code are located either in the same directory, or in src and ebin directories next to each other.

no_debug_info - The module has not been compiled with option debug_info set.

badarg - AbsModule is not found. This could be because the specified file does not exist, or because code:which/1 does not return a BEAM filename, which is the case not only for non-existing modules but also for modules that are preloaded or cover-compiled.

{app,App} - App is kernel, stdlib, gs, or debugger if AbsModule belongs to one of these applications.

Notice that the function can return true for a module that is not interpretable the module is marked as sticky or resides in a directory marked as sticky. The reason is that this is not discovered until the interpreter tries to load the module.

interpreted()

-spec interpreted() -> [Module] when Module :: module().

Returns a list with all interpreted modules.

n(AbsModule)

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

Stops interpreting the specified module on the local node.

Similar to i/1 and ni/1, a module can be specified by its module name or filename.

ni(AbsMods)

-spec ni(AbsModules | AbsModule) -> Result
            when
                AbsModules :: [AbsModule],
                AbsModule :: Module | File,
                Module :: module(),
                File :: file:name_all(),
                Result :: AbsModuleResult | AbsModulesResult,
                AbsModuleResult :: {module, Module} | error,
                AbsModulesResult :: ok.

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

A module can be specified by its module name (atom) or filename.

If specified by its module name, the object code Module.beam is searched for in the current path. The source code Module.erl is searched for first in the same directory as the object code, then in an src directory next to it.

If specified by its filename, the filename can include a path and the .erl extension can be omitted. The object code Module.beam is searched for first in the same directory as the source code, then in an ebin directory next to it, and then in the current path.

Note

The interpreter requires both the source code and the object code. The object code must include debug information, that is, only modules compiled with option debug_info can be interpreted.

The functions returns {module,Module} if the module was interpreted, otherwise error is returned.

The argument can also be a list of modules or filenames, in which case the function tries to interpret each module as specified earlier. The function then always returns ok, but prints some information to stdout if a module cannot be interpreted.

nn(AbsModule)

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

Stops interpreting the specified module on all known nodes.

Similar to i/1 and ni/1, a module can be specified by its module name or filename.

no_break()

-spec no_break() -> ok.

Deletes all breakpoints.

no_break(Module)

-spec no_break(Module :: term()) -> ok.

Deletes all breakpoints in Module.

snapshot()

-spec snapshot() -> [Snapshot]
                  when
                      Snapshot :: {Pid, Function, Status, Info},
                      Pid :: pid(),
                      Function :: {Module, Name, Args},
                      Module :: module(),
                      Name :: atom(),
                      Args :: [term()],
                      Status :: idle | running | waiting | break | exit | no_conn,
                      Info :: {} | {Module, Line} | ExitReason,
                      Line :: integer(),
                      ExitReason :: term().

Gets information about all processes executing interpreted code.

Pid - Process identifier.

Function - First interpreted function called by the process.

Status - Current status of the process.

Info - More information.

Status is one of the following:

idle - The process is no longer executing interpreted code. Info is {}.

running - The process is running. Info is {}.

waiting - The process is waiting at a receive. Info is {}.

break - Process execution is stopped, normally at a breakpoint. Info is {Module,Line}.

exit - The process is terminated. Info is ExitReason.

no_conn - The connection is down to the node where the process is running. Info is {}.

stack_trace()

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

Gets how to save call frames in the stack.

See stack_trace/1 for the meaning of Flag.

stack_trace(Flag)

-spec stack_trace(Flag) -> term() when Flag :: all | no_tail | false.

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. The following flags can be specified:

all - Save information about all current calls, that is, function calls that have not yet returned a value.

no_tail - Save information about current calls, but discard previous information when a tail-recursive call is made. This option consumes less memory and can be necessary to use for processes with long lifetimes and many tail-recursive calls. This is the default.

false - Save no information about current calls.

test_at_break(Module, Line, Function)

-spec test_at_break(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.

Function Function must fulfill the requirements specified in section Breakpoints.