These tests can only be used inside the debugger and only when focused
on the current invocation. If they appear in execution_state/2
or in execution_state/1
called outside the debugger, an exception
will be raised.
The notion of port in breakpoint handling is more general than outlined earlier in Procedure Box. Here, the following terms are used to describe a port:
call, exit(nondet), exit(det), redo, fail, exception(Exception), block, unblock
Furthermore, the atoms exit
and exception
can be used in
the port
condition (see below), to denote any of the two exit
ports and an arbitrary exception port, respectively.
port(
Port)
port(exit)
holds for both
exit(det)
and exit(nondet)
ports).
As explained earlier, the port condition for a non Call port is best placed in the action part. This is because the failure of the action part will cause the debugger to pass through the Call port silently, and to build a procedure box, even in zip mode. The following idiom is suggested for creating breakpoints at non Call ports:
add_breakpoint(Tests-[port(Port),Actions], BID).
bid(
BID)
none
if no breakpoint was selected.)
mode(
Mode)
mode
variable, which
reflects the current debugger mode.
command(
Command)
command
variable, which is the
command to be executed by default, if the breakpoint is selected.
show(
Show)
show
variable, i.e. the default
show method (the method for displaying the goal in the trace message).
The last three of the above tests access the debugger action
variables. For example, the condition mode(trace)
, if it occurs
in the tests, checks if the current debugger mode is
trace
. On the other hand, if the same term occurs within the
action part, it sets the debugger mode to trace
.
For the port
, mode
, command
and show
conditions, the condition can be replaced by its argument, if that is
not a variable. For example the condition call
can be used
instead of port(call)
. Conditions matching the terms listed
above as valid port values will be converted to a port
condition. Similarly, any valid value for the three debugger action
variables is converted to an appropriate condition. These valid values
are described in Action Variables.