[ Debugging | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
Sets a spypoint for the procedure(s) in SpecList.
- Sequence of expressions of the form Atom/Integer, or of the form atom.
This predicate sets spypoints on all the procedures given by SpecList in
a similar fashion to breakpoints in procedural languages. The
procedure(s) are all of the form name/arity or else of the form name, in
which case all procedures with name name have spy points set.
If not already debugging, the trace mode is switched on and set to leap.
When tracing, a leap command to the debugger will cause execution to
continue until it reaches a spied predicate. Setting a spy-point on a
non-existing procedure results in an error.
Note that spypoints can also be set using set_flag(Proc, spy, on).
Modes and Determinism
This predicate is sensitive to its module context (tool predicate, see @/2).
- (4) instantiation fault
- SpecList is not instantiated.
- (5) type error
- SpecList is not of the form Atom/Integer.
- (60) referring to an undefined procedure
- SpecList contains an undefined procedure.
user compiled 84 bytes in 0.00 seconds
[eclipse]: spy higher,writeln.
spypoint added to higher / 0.
spypoint added to writeln / 1.
spypoint added to writeln / 2.
+(1) 0 CALL higher (dbg)?- leap
B+(3) 2 CALL writeln(hi) (dbg)?- leap
B+(3) 2 EXIT writeln(hi) (dbg)?- leap
+(1) 0 EXIT higher (dbg)?- leap
spy(I). (Error 4).
spy("l"). (Error 5).
spy(foo). (Error 60).
nospy / 1, get_flag / 3, set_flag / 3