When the debugger is on, this predicate causes a new box to be entered, i.e. a trace line to be displayed with Port being the name of the port, invocation number Invoc and Term in the goal position.
It is important to use a corresponding trace_exit_port/0 call after every call to trace_call_port/3, otherwise the debugger's box nesting will get out of sync. Note however, that fail ports for the new box will be generated automatically.
If Invoc is left uninstantiated, it will be instantiated to a unique invocation number by the system.
search(Vars) :- trace_call_port(search_enter, _Invoc, search(Vars)), labeling(Vars), trace_exit_port. ?- length(L, 3), L :: 1..4, search(L). (1) 1 CALL length(L, 3) %> zap to port: [~ call] search_enter (6) 2 SEARCH_ENTER search([_501{[... .. ...]}, _514{[...]}, _527{...}]) %> skip (6) 2 *EXIT search([1, 1, 1]) %> skip