SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
research:pdt:docs:gui_tracer [2012/05/03 12:22]
fabian.noth
research:pdt:docs:gui_tracer [2018/05/09 01:59] (current)
Line 1: Line 1:
 +~~NOTOC~~
 +{{page>​header_version&​nofooter}}
 +
 +====== GUI Tracer ======
 +
 +===== The GUI Tracer Window ​ =====
 +
 +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 | On Windows the GUI tracer window is intially iconified. Look for its symbol in the task bar and expand it to see the view shown below.) ++
 +) that 
 +  - Shows bindings of variables
 +  - Shows the call stack of the running Prolog process
 +  - Shows the contents of the prolog source file and the executed goal.
 +  - Shows the type of call: initial call (green), redo (yellow), fail (red) and success (blue). ​
 +
 +{{pdt_gui_tracer.png?​600|The SWI-Prolog GUI tracer window}}
 +
 +The tool bar of the SWI-Prolog GUI tracer offers some useful shortcuts
 +
 +{{screen4.png?​600|The SWI-Prolog GUI tracer toolbar. }}
 +
 +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.
 +
 +===== Inspecting Variable Bindings =====
 + 
 +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)
 +
 +{{screen6.png?​600|Viewing large variable bindings in the SWI-Prolog GUI-Tracer}}
 +
 +
 +===== Setting Breakpoints =====
 +
 +It is also possible to set breakpoints in the Editor. See [[editor#​breakpoints]].
 +
 +Via''​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).
 +
 +{{screen5.png?​400|Setting breakpoints in the SWI-Prolog GUI-Tracer}}
  
research/pdt/docs/gui_tracer.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019