Spypoints allow you to indicate where to stop on
a per-predicate or even per-goal basis. For example, you might find
that you want to run until some particular predicate is called. In
this case, you would set a spypoint on that predicate, using
spy/1. Such spypoints are turned off with nospy/1.
It may be desirable to stop when you get to a particular call from one
predicate to another. This can be done with the built-in predicate
add_spypoint/1. These spypoints can be removed with
remove_spypoint/1.
To examine spypoints, use current_spypoint/1. Spypoints are
also included in the output of debugging/0. Finally, spypoints
can be removed all at once with nospyall/0.
The debuggers also have commands for setting spypoints, which are easier to use than these predicates.