11.3.207 (spy)/[1,2] [development]

Synopsis

spy +PredSpecs

Sets plain spypoints on all the predicates represented by PredSpecs.

spy(+PredSpecs, +Conditions)

Sets conditional spypoints on all the predicates represented by PredSpecs.

Arguments

:PredSpecs
pred_spec_tree

A predicate specification, or a list of such.

:Conditions
term, must be ground

Spypoint conditions.

Description

Turns debugger on in debug mode, so that it will stop as soon as it reaches a spypoint. Turning off the debugger does not remove spypoints. Use nospy/1 or nospyall/0) to explicitly remove them.

If you use the predicate specification form Name but there are no clauses for Name (of any arity), then a warning message will be displayed and no spypoint will be set.

     | ?- spy test.
     * spy user:test - no matching predicate

Exceptions

instantiation_error
type_error
domain_error
if a PredSpec is not a valid procedure specification

See Also

Basic Debug, Plain Spypoint, Breakpoint Predicates.


Send feedback on this subject.