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
debugger_print_options
Prolog flag.
silent
display
display
.
write
writeq
.
write_term(
Options)
Method-
Sel
Values allowed in the command
condition:
ask
proceed
flit
proceed
.
proceed(
Goal,
New)
retry(
Inv)
command value below). Next,
unify the current goal with Goal and execute the goal New in
its place. Create (or keep) a procedure box for the current goal.
This construct is used by the u
(unify)
interactive debugger command.
Both the Goal and New arguments are module name expanded when the breakpoint is added: the module of Goal defaults to the module of the current goal, while that of New to the module name of the breakpoint spec. If the command value is created during run time, then the module name of both arguments defaults to the module of the current goal.
The term proceed(
Goal,
New)
will be copied
when the command
action variable is set. Therefore breakpoint
specs of form
Tests - [goal(foo(X)),...,proceed(_,bar(X))]should be avoided, and
Tests - [goal(foo(X)),...,proceed(foo(Y),bar(Y))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)
Same as proceed(
Goal,
New)
, but do not create (or discard) a
procedure box for the current goal. (Consequently no other ports will
be encountered for this invocation.)
Notes for proceed/2
, on module
name expansion and copying, also apply to flit/2
.
exception(
E)
abort
retry(
Inv)
r
, retry;
see Debug Commands.
reexit(
Inv)
je
, jump to Exit port; see Debug Commands.
redo(
Inv)
jr
, jump to Redo port; see Debug Commands.
fail(
Inv)
f
,
fail; see Debug Commands.
Values allowed in the mode
condition:
qskip(
Inv)
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)
mode
to trace
there.
Inv should obey the same rules as for qskip
.
trace
debug
zip
off