![]() |
Breakpoints are useful for debugging programs, especially large programs. By using a breakpoint it is possible to have the prolog interpreter stop processing if it encounters a predicate in a certain state. For instance: it can stop on failing or exiting of a predicate called 'test' with 2 arguments. The functor column of the breakpoint grid displays the name of the predicate on which a breakpoint must stop. The state column specifies the state of the breakpoint (the possible states are Enter, Exit, Fail, Redo, Call and Solution), the last column Hitcount shows how many times in the current run the breakpoint was encountered and execution was stopped.
After the prolog interpreter has stopped, it is possible to start stepping through the prolog program or continue processing. After a breakpoint the execution trace of the prolog program is turned on.
New
Add a new breakpoint. A dialog to enter information about the new
breakpoint is displayed.
Remove
Current selected breakpoint is deleted. A breakpoint can be selected by pressing the left
mouse button over a breakpoint in the grid below this button.
Functor/Line
This columns displays the name of the functor and the arity of the clause. For instance:
if a/1 is displayed then the breakpoint is set for a clause with functor 'a' and arity 1.
If the breakpoint is on a line in the text editor then the number of the line is displayed
here.
State/File
This column displays the state of the breakpoint, the combination of the clause
and the state of the Prolog inference engine trigger a breakpoint. If the breakpoint is on
a line in the text editor then the name of the file is displayed.
Hitcount
This columns displays the number of times the breakpoint was hit during the proving of the
current goal, after proving the main goal of a program has finished all the breakpoint hit
counters are reset to 0
see also: Add Breakpoint window