7.11 Setting Breakpoints

You can set breakpoints in Sweep Prolog mode buffers to have SWI-Prolog break before specific goals in the code (see Breakpoints in the SWI-Prolog manual).

C-c C-b

Set a breakpoint (sweeprolog-set-breakpoint).

User Option: sweeprolog-highlight-breakpoints

Whether to highlight breakpoints in Sweep Prolog mode buffers. Defaults to t.

The command sweeprolog-set-breakpoint, bound to C-c C-b, sets a breakpoint at the position of the cursor. If you call it with a positive prefix argument (for example, C-u C-c C-b), it creates a conditional breakpoint with a condition goal that you insert in the minibuffer. If you call it with a non-positive prefix argument (for example, C-0 C-c C-b), it deletes the breakpoint at point instead.

When Context Menu mode is enabled, you can also create and delete breakpoints in sweeprolog-mode buffers through right-click context menus (see Context Menu).

By default, Sweep highlights terms with active breakpoints in Sweep Prolog mode buffers. To inhibit breakpoint highlighting, customize the user option sweeprolog-highlight-breakpoints to nil.