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.