This is a topic to discuss the Wiki
Subtopics to cover:
What is gtrace/0?
How is gtrace different from trace/0?
Is there any other ways to trace code? Note meta-interpreter.
Explain each command: See Overview of the Debugger
See: Gtrace - Example finite-state automaton
Explain how behind the seen data structures such as frames effect how gtrace works.
See: Descriptions of the icons/glyphs in the graphical debugger?
Explain source code line highlight color.
Explain parts of the window.
Explain lines in upper right display frame.
Explain slider controls between panels for resizing.
Explain use with constraints. See: Understanding CLP(FD) Prolog code of N-queens problem
Explain development cycle that doesn’t require shutting down and starting gtrace each time by using make e.g.
edit, save, make, gtrace, query
Also note that if the source code is in modules and unit test are in the same file as the module and not in a plt file then the unit test can catch problems before needing to start gtrace in some cases which leads to faster development cycles.
See: Small bug in the gui tracer
Note display problem that sometimes happens.
Talk about debugging threads.
See: Lazy list
Talk about how lazy list are displayed with gtrace.
Talk about how to change the viewing of variable values using the dialog.
Explain how indexing works and show how it skips ahead. It may look like a predicate was skipped but it wasn’t.
Show example of how long list of
\+<character>, causes gtrace to speed ahead while updating screen; appears to jiggle.
Note that if Prolog had types and more specifically Algebraic Data Types, a class of errors could be eliminated or at least noted at compile time instead of run time and thus the need to use gtrace for them would be eliminated.
With regards to algebraic data types and SWI-Prolog see package typedef. I have not used this, but worth a look.