Port is one of call , redo , exit , fail or unify . Frame is an integer reference to the current local stack frame. Action should be unified with one of the atoms continue (just continue execution), retry (retry the current goal) or fail (force the current goal to fail). Leaving it a variable is identical to continue .
Together with the predicates described in section and the other predicates of this chapter this predicate enables the Prolog user to define a complete new debugger in Prolog. Besides this it enables the Prolog programmer monitor the execution of a program. The example shown in figure records all goals trapped by the tracer in the database. To trace the execution of `go' this way the following query should be given:
Figure: Record a trace in the database