12.3 Breaking (spy) on methods

Prolog-defined methods are all implemented using the same predicate, which makes it hard to use spy/1 for starting the debugger on a method. One way around is to stick a call to trace/0 into the method body and recompile the file. For those among us who dislike this idea there is the possibility to use spypce/1.

spypce(+Spec)
Spec specifies a send- or get-method like tracepce/1. If the method is defined in Prolog XPCE calls trace/0 just before starting the implementation of the method.