leash/1
development
Synopsis
leash(
+Mode)
Starts leashing on the ports given by Mode.
Arguments
- Mode one of
[all]
or one of [call,exit,redo,fail,done,head,exception]
- either the atom
all
, or a list of the ports to be leashed.
Description
- The leashing mode only applies to procedures that do not have spypoints
on them, and it determines which ports of such procedures are leashed. By
default, all seven ports are leashed. On arrival at a leashed port, the
debugger will stop to allow you to look at the execution state and decide
what to do next. At unleashed ports, the goal is displayed but program
execution does not stop to allow user interaction.
- If you are using QUI, a more convenient way to set leashing is by using
the "Leashing..." item in the "Options" menu. This brings up a dialog,
which allows you to choose which ports to leash.
- In DEC-10 Prolog, a different form of argument was used for
leash/1
. This form, in which the argument is an integer from 0
to 127, is also supported by Quintus Prolog, but is not recommended, since the new
form is clearer.
- This predicate is not supported in runtime systems.
Examples
| ?- leash([]).
turns off all leashing; now when you creep you will get an exhaustive
trace but no opportunity to interact with the debugger. You can get
back to the debugger to interact with it by pressing ^c t. The
command
| ?- leash([call,redo]).
leashes on the Call and Redo ports. When creeping, the debugger will
now stop at every Call and Redo port to allow you to interact.
Exceptions
instantiation_error
- Mode is not ground
domain_error
- Mode is not a valid leash specification
See Also
dbg-bas-bas