- Using the Prolog IDE
If GUI tracing is enabled, the query
?- trace, p(X,Y,Z).
opens the SWI-Prolog GUI tracer as a new window ( A note to Windows users ) that
The tool bar of the SWI-Prolog GUI tracer offers some useful shortcuts
The buttons in (1) provide - from left to right - the option to show the unifier for the current goal, step into the current goal's execution, step over it or finish the selected goal. The buttons in (2) provide - from left to right – the option to step to the next spy point, add spy points, set a stop at the caret and to remove spy points. For details on other buttons see the respective tool tip.
If a variable's value is too long to fit in the bindings frame (1) you can view it in full in a separate window by double clicking the variable in (1)
It is also possible to set breakpoints in the Editor. See breakpoints.
Edit > Breakpoints you can define spy points on predicates occurring in the program (by entering the predicate's name/arity and then pressing the left-most button – see red arrow).