Availability:built-in
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.