[ Debugging | Reference Manual | Alphabetic Index ]

trace_point_port(+Port, ?Invoc, ?Term)

Create a user-defined debugger port.
An atom.
An integer or variable.
Any term.


This predicate allows to generate user-defined debugger ports, thus enhancing the debugger's basic box model with application- specific checkpoints.

When the debugger is on, this predicate causes a trace line to be displayed with Port being the name of the debugger port, invocation number Invoc and Term in the goal position.

If Invoc is left uninstantiated, it will be instantiated to a unique invocation number by the system, if it is an integer, it will be used. This way, several ports can be made to share the same invocation number, which makes it possible to easily i-skip from one to the other.

Modes and Determinism


This predicate is sensitive to its module context (tool predicate, see @/2).


    :- pragma(nodebug).
    bool(B) :-
	trace_point_port(try_zero, Invoc, B=0),  
	    trace_point_port(try_one, Invoc, B=1),
    :- untraceable bool/1.

[eclipse 9]: bool(B).
  (3) 3 TRY_ZERO  B = 0   %> creep

B = 0     More? (;) 
  (3) 3 TRY_ONE  B = 1   %> creep

B = 1

See Also

trace_call_port / 3, trace_parent_port / 1, trace_exit_port / 0, spy_term / 2, spy_var / 1, trace / 1