Only spying some of the time / using spypoint_condition



Hello,

I'm trying to debug a complex Prolog program and I have a spy set on a
particular predicate. However this predicate gets called a lot and
most of the times I'm not interested in it. So I only want to spy on
it when the arguments match what I'm interested in. It seems like
spypoint_condition is what I need to use.

(from http://www.sics.se/SICS-reports/SICS-T--93-01--SE/report_4.html
)

spypoint_condition(:Goal,?Port,+Test) Sets a conditional spy-point on
the predicate for Goal. When the debugger reaches the spy-point, three
conditions must be met for the spy-point to apply: The actual goal
must match Goal, the actual port must match Port, and Test (an
arbitrary Prolog goal) must succeed.
<<

I tried doing
spypoint_condition(predicate_name, _, _).
because I'm not sure how those other arguments should work, but it was
a waste of time because it's an unknown predicate anyway. :/ I'm using
MasterProlog.

Any thoughts on how to approach this?

thanks,
Brianna

.