Descriptions of the icons/glyphs in the graphical debugger?

I’m using: SWI-Prolog version 8.0.2

Where can I find a document that explains what all the little icons/glyphs/graphics mean that you see in the XPCE graphical debugger? I looked through the Help docs and didn’t find anything. For example what does the two headed red arrow next to a line of code in the debugger mean in the Call Stack window, etc.? If I could find a complete list of these graphical elements I’d appreciate it.

1 Like

Better to add more confusion now then to get, “why didn’t you tell me this then!”.

There are also different colors for the source code line highlights.


Normal, Success






Unification of the head







Don’t have image. :roll_eyes:

I actually have an entire state transition diagram based on Overview of the Debugger but it was written using GraphViz dot and PNG files. The dot is used to generate a SVG, but sadly either SVG can not be loaded up to discourse or I lack the trust level; not sure.


Tried to add FSA as SVG here but Discourse has an upload scanner that filters out HTML image tags by default, so as suggested by @jamesnvc converted it to a PDF and posted a link to it in Gtrace - Example finite-state automaton.

The two-headed icon indicates there is an open choice. Single headed means the environment has no choice open. Frames to the left represent the call stack. Those more to the right represent goals that succeeded with a choice point. The arrows connect the choice points from latest to older ones. You can click on any of the frames. Those on the call stack gets you to the parent frame. Those to the right show which was the last clause that succeeded. You can use ‘u’ from the choice points to include the callers into the overview.

There is no overview. If someone wants to write one, I’m happy to help and correct. I hoped the icons are fairly intuitive (surely they are ugly :slight_smile: ). There are several way of using the debugger that are less obvious though, notably for navigating the stack view.


Which repo has the source for the graphical debugger? I’m assuming if I take a look at certain code modules I can figure out the rest of the icons/legend?

The graphical debugger is an indispensable tool and at least for me, has changed completely my feelings about debugging Prolog programs.

SWI-Prolog can find it for you:

?- guitracer.
?- edit(prolog_debugger).

That gets you into the main file. The icons are in the icons sub directory. If the above starts the default editor, use ^C^F to browse for a new file and (thus) shows the directory or use the menu File/Properties

Part of the trick is to find prolog_debugger. To do that, start tracing. If you see the tracer, use the menu Help/XPCE Manual. This opens a little window with only a menu. Click Tools/Visual hierarchy. Now click the pointing hand button in the new window and then click in the graphical debugger. Now you should see a hierarchy of visual objects. Make a clever guess where the interesting stuff starts and use the right-click on it to select Source.

1 Like