Node:Action Variables,
Previous:Condition Macros,
Up:Breakpoint Conditions
The Action Variables
In this section we list the possible values of the debugger action
variables, and their meaning.
Note that the Prolog terms, supplied as values, are copied when a
variable is set. This is relevant primarily in case of the
proceed/2
and flit/2
values.
Values allowed in the show
condition:
print
- Write using options stored in the
debugger_print_options
Prolog flag.
silent
- Display nothing.
display
- Write using
display
.
write
- Write using
writeq
.
write_term(Options)
- Write using options Options.
Method-Sel
- Display only the subterm selected by Sel,
using Method. Here, Method is one of the methods above, and
Sel is a subterm selector.
Values allowed in the command
condition:
ask
- Ask the user what to do next.
proceed
- Continue the execution without interacting with the user (cf. unleashing).
flit
- Continue the execution without building a procedure box for the current goal
(and consequently not encountering any other ports for this invocation).
Only meaningful at Call ports, at other ports it is equivalent to
proceed
.
proceed(Goal,New)
- Unify the current goal with Goal and execute the goal New in
its place. Goal and New are module name expanded only at
execution time with the current type-in module as the default. Only
available at Call ports. This construct is used by the
u
(unify)
interactive debugger command.
The term proceed(Goal,New)
will be copied
when the command
action variable is set. Therefore breakpoint
specs of form
goal(foo(X))-proceed(_,bar(X))
should be avoided, and
goal(foo(_))-proceed(foo(X),bar(X))
should be used instead. The
first variant will not work as expected if X
is non-ground, as the
variables in the bar/1
call will be detached from the original
ones in foo/1
. Even if X
is ground, the first variant may
be much less efficient, as it will copy the possibly huge term X
.
flit(Goal,New)
- Unify the current goal with Goal and execute the goal New in
its place, without creating a procedure box for Goal (and
consequently not encountering any other ports for this invocation).
Only available at Call ports. Notes for
proceed/2
, on module
name expansion and copying, also apply for flit/2
.
exception(E)
- Raise the exception E.
abort
- Abort the execution.
retry(Inv)
- Retry the the most recent goal in the backtrace with an invocation
number less or equal to Inv (go back to the Call port of the
goal). This is used by the interactive debugger command
r
, retry;
see Debug Commands.
reexit(Inv)
- Re-exit the the invocation with number Inv (go back to the Exit
port of the goal). Inv must be an exact reference to an exited
invocation present in the backtrace (exited nondeterministically, or
currently being exited). This is used by the
interactive debugger command
je
, jump to Exit port; see Debug Commands.
redo(Inv)
- Redo the the invocation with number Inv (go back to the Redo port
of the goal). Inv must be an exact reference to an exited
invocation present in the backtrace. This is used by the
interactive debugger command
jr
, jump to Redo port; see Debug Commands.
fail(Inv)
- Fail the most recent goal in the backtrace with an invocation number
less or equal to Inv (transfer control back to the Fail port of
the goal). This is used by the interactive debugger command
f
,
fail; see Debug Commands.
Values allowed in the mode
condition:
qskip(Inv)
- Quasi-skip until the first port with invocation number less or equal to
Inv is reached. Having reached that point,
mode
is set to
trace
. Valid only if Inv >= 1 and furthermore Inv =<
CurrInv for entry ports (Call, Redo), and Inv <
CurrInv for all other ports, where CurrInv is the invocation
number of the current port.
skip(Inv)
- Skip until the first port with invocation number less or equal to
Inv is reached, and set
mode
to trace
there.
Inv should obey the same rules as for qskip
.
trace
- Creep.
debug
- Leap.
zip
- Zip.
off
- Continue without debugging.