Node:Debug Pred, Next:, Previous:Coroutining, Up:Built Intro



Debugging

Debugging predicates are not available in runtime systems.

unknown(?OldState,?NewState)

OldState is the current state of the "Action on unknown predicates" flag, and sets the flag to NewState. This flag determines whether or not the system is to catch calls to undefined predicates (see Undefined Predicates), when user:unknown_predicate_handler/3 cannot handle the goal. The possible states of the flag are:

trace
Causes calls to undefined predicates to be reported and the debugger to be entered at the earliest opportunity. Not available in runtime systems.
fail
Causes calls to such predicates to fail.
warning
Causes calls to such predicates to display a warning message and then fail.
error
Causes calls to such predicates to raise an exception (the default). See Exception.

debug

The debugger is switched on in leap mode. See Basic Debug.

trace

The debugger is switched on in creep mode. See Basic Debug.

zip

The debugger is switched on in zip mode. See Basic Debug.

nodebug
notrace
nozip

The debugger is switched off. See Basic Debug.

leash(+Mode)

Leashing Mode is set to Mode. See Basic Debug.

spy :Spec

Plain spypoints are placed on all the predicates given by Spec. See Plain Spypoint.

spy(:Spec, :Conditions)

Spypoints with condition Conditions are placed on all the predicates given by Spec. See Breakpoint Predicates.

nospy :Spec

All spypoints (plain and conditional) are removed from all the predicates given by Spec. See Plain Spypoint.

nospyall

Removes all the spypoints (including the generic ones) that have been set.

debugging

Displays information about the debugger. See Basic Debug.

add_breakpoint(:Conditions, ?BID)

Creates a breakpoint with Conditions and with identifier BID. See Breakpoint Predicates.

current_breakpoint(:Conditions, ?BID, ?Status, ?Kind)

There is a breakpoint with conditions Conditions, identifier BID, enabledness Status, and kind Kind. See Breakpoint Predicates.

remove_breakpoints(+BIDs)
disable_breakpoints(+BIDs)
enable_breakpoints(+BIDs)

Removes, disables or enables the breakpoints specified by BIDs. See Breakpoint Predicates.

execution_state(:Tests)

Tests are satisfied in the current state of the execution.

execution_state(+FocusConditions, :Tests)

Tests are satisfied in the state of the execution pointed to by FocusConditions.

debugger_command_hook(+DCommand,?Actions) [Hook]
user:debugger_command_hook(+DCommand,?Actions)

Allows the interactive debugger to be extended with user-defined commands. See Debug Commands.

error_exception(+Exception) [Hook]
user:error_exception(+Exception)

Tells the debugger to enter trace mode on certain exceptions. See Advanced Debugging.