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. Tracing a predicate is achieved by
wrapping the predicate using wrap_predicate/4.
Each time a port (of the 4-port model) is passed that has a trace point set, the goal is printed. 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. |