|Did you know ...||Search Documentation:|
|prolog_breakpoints.pl -- Manage Prolog break-points|
This module provides an interface for development tools to set and delete break-points, giving a location in the source. Development tools that want to track changes to breakpoints must use user:message_hook/3 to intercept these message terms:
Note that the hook must fail after creating its side-effects to give other hooks the opportunity to react.
First, '$clause_from_source'/4 uses the SWI-Prolog clause-source information to find the last clause starting before Line. '$break_pc' generates (on backtracking), a list of possible breakpoints.
Note that in addition to setting the breakpoint, the system must be in debug mode for the breakpoint to take effect. With threading enabled, there are various different ways this may be done. See debug/0, tdebug/0 and tdebug/1. Therefore, this predicate does not enable debug mode.
print_message(breakpoint(delete, Id))is called. Message hooks working on this message may still call breakpoint_property/2.
Variables in Cond that match by name to variables in the source definition of the clause in which the breakpoint is located are unified with the corresponding runtime value of the clause variables in the current execution frame, before evaluating the condition goal.
The following predicates are exported, but not or incorrectly documented.