The SWI-Prolog Tracer

The PDT lets you use all the built-in tracing facilities of SWI-Prolog. The SWI-Prolog tracer is invoked by calling trace before the goal you want to trace. For instance, if you want to trace the execution of p(X,Y,Z) you call:

?- trace, p(X,Y,Z).

What you get as a result of such a call depends on the enabled tracing mode:

The SWI-Prolog GUI tracer window
GUI Tracer (recommended, enabled by default) Console Tracing

Switching between tracing modes

Deactivating the GUI tracer will automatically activate console tracing.

A note to Mac users

The GUI tracer is enabled / disabled by using the menu in the Prolog Console Toolbar.

Alternatively, the GUI tracer is enabled / disabled by typing guitracer / noguitracer in the Prolog Console:

Enabling / disabling the GUI tracer from the console.

Last modified: 2017/08/29 21:50