11.3.108 leash/1 [development]

Synopsis

leash(+Mode)

Starts leashing on the ports given by Mode.

Arguments

Mode
list of one of [call,exit,redo,fail,exception,all,half,loose,tight,off], must be ground

A list of the ports to be leashed. A single keyword can be given without enclosing it in a list.

Description

Some of the keywords denote a set of ports:

all
Stands for all five port.
half
Stands for the Exception, Call and Redo ports.
loose
Stands for the Exception and Call ports.
tight
Stands for all ports but Exit.
off
Stands for no ports.

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 five 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.

Exceptions

instantiation_error
Mode is not ground
domain_error
Mode is not a valid leash specification

Examples

     | ?- leash(off).

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.

     | ?- 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.

See Also

Basic Debug.


Send feedback on this subject.