Next: , Up: Edebug Breaks   [Index]


K.3.7.1 Breakpoints

While using Edebug, you can specify “breakpoints” in the program you are testing: these are places where execution should stop. You can set a breakpoint at any stop point, as defined in *note Using Edebug. Re-evaluating or reinstrumenting a definition removes all of its previous breakpoints. Edebug always stops or pauses at a breakpoint, except when the Edebug mode is Go-nonstop. In that mode, it ignores breakpoints entirely.

To find out where your breakpoints are, use the ‘B’ command, which moves point to the next breakpoint following point, within the same function, or to the first breakpoint if there are no following breakpoints. This command does not continue execution—it just moves point in the buffer.

CommandFunctionDescription
bedebug-set-breakpointSet a breakpoint at the stop point at or after point
uedebug-unset-breakpointUnset the breakpoint (if any) at the stop point at or after point
x CONDedebug-set-conditional-breakpointSet a conditional breakpoint which stops the program only if evaluating COND produces a non-‘nil’ value
Bedebug-next-breakpointMove point to the next breakpoint in the current definition

Conditional Breakpoints

A “conditional breakpoint” tests a condition each time the program gets there. Any errors that occur as a result of evaluating the condition are ignored, as if the result were ‘nil’.

To set a conditional breakpoint, use ‘x’, and specify the condition expression in the minibuffer. Setting a conditional breakpoint at a stop point that has a previously established conditional breakpoint puts the previous condition expression in the minibuffer so you can edit it.

Making a Breakpoint Temporary

You can make a conditional or unconditional breakpoint “temporary” by using a prefix argument with the command to set the breakpoint. When a temporary breakpoint stops the program, it is automatically unset.


Next: Global Break Condition, Up: Edebug Breaks   [Index]