This section is a reference to the debugger interaction predicates. A more use-oriented overview of the debugger is in section 2.9.
If you have installed XPCE, you can use the graphical frontend of the tracer. This frontend is installed using the predicate guitracer/0.
trace(Pred, +all)
.
call
,
redo
, exit
, fail
). The atom all
refers to all ports. If the port is preceded by a -
sign the trace-point is cleared for the port. If it is preceded by a +
the trace-point is set.
The predicate trace/2 activates debug mode (see debug/0). Each time a port (of the 4-port model) is passed that has a trace-point set the goal is printed as with trace/0. Unlike trace/0 however, the execution is continued without asking for further information. Examples:
?- trace(hello). | Trace all ports of hello with any arity in any module. |
?- trace(foo/2, +fail). | Trace failures of foo/2 in any module. |
?- trace(bar/1, -all). | Stop tracing bar/1. |
The predicate debugging/0 shows all currently defined trace-points.
debug
.
debug
. See
also debug/0.
debug
.
call
, redo
, exit
, fail
and
unify
. The special shorthand all
refers to all
ports,
full
refers to all ports except for the unify port
(default).
half
refers to the call
, redo
and fail
port.
full
.
unknown
. Values are trace
(meaning error
)
and fail
. If the unknown
flag is set to
warning
, unknown/2
reports the value as trace
.
:- style_check(-atom). |
Currently available options are:
Name | Default | Description |
singleton | on | read_clause/1 (used by consult/1) warns on variables only appearing once in a term (clause) which have a name not starting with an underscore. |
atom | on | read/1 and derivatives will produce an error message on quoted atoms or strings longer than 5 lines. |
dollar | off | Accept dollar as a lower case character, thus avoiding the need for quoting atoms with dollar signs. System maintenance use only. |
discontiguous | on | Warn if the clauses for a predicate are not together in the same source file. |
string | off | Backward
compatibility. See the prolog-flag
double_quotes (current_prolog_flag/2). |