spy/1
developmentspy
+PredSpecs
Sets spypoints on all the predicates represented by PredSpecs
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.
Note that since spy
is a built-in operator, the parentheses, which usually
surround the arguments to a predicate, are not necessary (although they can be
used if desired).
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. % The debugger will first leap -- showing spypoints (debug) * There are no predicates with the name test in module user yes [debug]
To place a spypoint on a currently undefined procedure, use the full form Name/Arity; you will still get a warning message, but the spypoint will be set .
| ?- spy test/1. * You have no clauses for user:test/1 % Spypoint placed on user:test/1 yes [debug] | ?-
If spy/1
is given any invalid argument it prints a warning.
This predicate is not supported in runtime systems.
instantiation_error
type_error
domain_error
permission_error
nospy/1
, nospyall/0
, debug/0
, current_spypoint/1
, add_spypoint/1
, remove_spypoint/1