Debug Builtin Predicate Set

The PrologJ debugging facilities are supported by the predicates in the Debug predicate set. For detailed discussion of the debugging facilities, see the Debugging Documentation topic.
 

debugging / 0
Prototype: debugging
Prints to debugger output a listing of predicates for which leashed or unleashed tracing has been enabled by spy/1 or trace/1.
Example: debugging - prints a listing of traced predicates.
 
nodebug / 0
Prototype: nodebug
Disables leashed or unleashed tracing for all predicates for which it is currently enabled. This is not the same as setting the debug flag to off, since the latter disables debugging only until it is turned back on, but rather permanently disables tracing and so is equivalent to individually disabling tracing using nospy/1 or notrace/1.
Example: nodebug - disables leashed or unleashed tracing on all predicates.
 
nospy / 1
Prototype: nospy(PredicateIndicatorOrFunctor)
Disables leashed tracing on the specified predicate, or on all predicates having the specified functor (if FunctorOrPredicateIndicator is an atom), and prints a message to debugging output for the predicate / each predicate indicating whether leashed tracing was disabled or was already disabled.
Example: nospy(test/1) - disables leashed tracing on test/1 and prints a message to that effect, or prints a message indicating leashed tracing was disabled already.
Example: nospy(test) - disables leashed tracing on test/1 and test/2 and prints a message to that effect, or prints a message indicating leashed tracing was disabled already.
 
notrace / 0
Prototype: notrace
Disables global unleashed tracing that was emabled by trace/0. Individual predicates for which leashed or unleashed tracing was enabled by spy/1 ortrace/1 are not affected.
Example: notrace - disables global tracing.
 
notrace / 1
Prototype: notrace(PredicateIndicatorOrFunctor)
Disables unleashed tracing on the specified predicate, or on all predicates having the specified functor (if FunctorOrPredicateIndicator is an atom), and prints a message to debugging output for the predicate / each predicate indicating whether unleashed tracing was disabled or was already disabled.
Example: notrace(test/1) - disables unleashed tracing on test/1 and prints a message to that effect, or prints a message indicating unleashed tracing was disabled already.
Example: notrace(test) - disables unleashed tracing on test/1 and test/2 and prints a message to that effect, or prints a message indicating unleashed tracing was disabled already.
 
spy / 1
Prototype: spy(PredicateIndicatorOrFunctor)
Enables leashed tracing on the specified predicate, or on all predicates having the specified functor (if FunctorOrPredicateIndicator is an atom), and prints a message to debugging output for the predicate / each predicate indicating whether leashed tracing was enabled or was already enabled.
Example: spy(test/1) - enables leashed tracing on test/1 and prints a message to that effect, or prints a message indicating leashed tracing was enabled already.
Example: spy(test) - enables leashed tracing on test/1 and test/2 and prints a message to that effect, or prints a message indicating leashed tracing was enabled already.
 
trace / 0
Prototype: trace
Enables global unleashed tracing on all predicates, until disabled by notrace/1.
Example: trace - enables global tracing.
 
trace / 1
Prototype: trace(PredicateIndicatorOrFunctor)
Enables unleashed tracing on the specified predicate, or on all predicates having the specified functor (if FunctorOrPredicateIndicator is an atom), and prints a message to debugging output for the predicate / each predicate indicating whether unleashed tracing was enabled or was already enabled.
Example: trace(test/1) - enables unleashed tracing on test/1 and prints a message to that effect, or prints a message indicating unleashed tracing was enabled already.
Example: trace(test) - enables unleashed tracing on test/1 and test/2 and prints a message to that effect, or prints a message indicating unleashed tracing was enabled already.