Scryer Prolog documentation

Module debug

:- use_module(library(debug)).

Declarative debugging.

This library provides three predicates with associated operators. The operators can be placed in front of goals to debug Prolog programs.

Of these predicates, the most frequently used is (*)/1, with associated prefix operator * (star). Placing * in front of a goal means to generalize away the goal. * Goal acts as if Goal did not appear at all in the source code. It is declaratively equivalent to commenting out the goal, and easier to write, because * can also be placed in front of the last goal in a clause without any additional changes.

Source: https://stackoverflow.com/a/30791637

$-(Goal)

Portray exceptions thrown by Goal.

$(Goal)

Provide a trace for calls of Goal.

*(Goal)

Generalize away Goal.