![]() |
YAP 7.1.0
|
The following predicates are available to control the debugging of programs: More...
The following predicates are available to control the debugging of programs:
debug
Switches the debugger on
Outputs status information about the debugger which includes the leash
mode and the existing spy-points, when the debugger is on
nodebug
Switches the debugger off
| class spy/1 |
spy( + P )
Sets spy-points on all the predicates represented by P P can either be a single specification or a list of specifications Each one must be of the form Name/Arity or Name In the last case all predicates with the name Name will be spied As in C-Prolog, system predicates andpredicates written in C, cannot be spied
| class nospy/1 |
| class leash/1 |
leash(+ M)
Sets leashing mode to M The mode can be specified as:
full prompt on Call, Exit, Redo and Failtight prompt on Call, Redo and Failhalf prompt on Call and Redoloose prompt on Calloff never promptnone never prompt, same as offThe initial leashing mode is full
The user may also specify directly the debugger ports where he wants to be prompted If the argument for leash is a number N, each of lower four bits of the number is used to control prompting at one the ports of the box model The debugger will prompt according to the following conditions:
N/\ 1 =\= 0 prompt on failN/\ 2 =\= 0 prompt on redoN/\ 4 =\= 0 prompt on exitN/\ 8 =\= 0 prompt on callTherefore, leash(15) is equivalent to leash(full) and leash(0) is equivalent to leash(off)
Another way of using leash is to give it a list with the names of the ports where the debugger should stop For example, leash([call,exit,redo,fail]) is the same as leash(full) or leash(15) and leash([fail]) might be used instead of leash(1)