The following predicates control the operation of the CHR debugger:
chr_trace
Switches the CHR debugger on and ensures that the next time control enters a CHR port, a message will be produced and you will be asked to interact.
At this point you have a number of options. See CHR Debugging Options. In particular, you can just type <RET> to creep (or
single-step) into your program. You will notice that the CHR
debugger stops at many ports. If this is not what you want, the
predicate chr_leash
gives full control over the ports
at which you are prompted.
chr_debug
Switches the CHR debugger on and ensures that the next time control
enters a CHR port with a spypoint set, a message will be
produced and you will be asked to interact.
chr_nodebug
Switches the CHR debugger off. If there are any spypoints set
then they will be kept.
chr_notrace
Equivalent to chr_nodebug
.
chr_debugging
Prints onto the standard error stream information about the current CHR debugging state. This will show:
chr_leash(
+Mode)
The leashing mode is set to Mode. It determines the CHR ports at which you are to be prompted when you creep through your program. At unleashed ports a tracing message is still output, but program execution does not stop to allow user interaction. Note that the ports of spypoints are always leashed (and cannot be unleashed). Mode is a list containing none, one or more of the following port names:
call
exit
redo
fail
wake
try
apply
insert
remove
The initial value of the CHR leashing mode is
[call,exit,fail,wake,apply]
. Predefined shortcuts are:
chr_leash(none), chr_leash(off)
chr_leash(all)
chr_leash(default)
chr_leash([call,exit,fail,wake,apply])
.
chr_leash(call)