Go to the first, previous, next, last section, table of contents.


Breakpoints

Edebug's step mode stops execution at the next stop point reached. There are three other ways to stop Edebug execution once it has started: breakpoints, the global break condition, and source breakpoints.

While using Edebug, you can specify breakpoints in the program you are testing: points where execution should stop. You can set a breakpoint at any stop point, as defined in section Using Edebug. For setting and unsetting breakpoints, the stop point that is affected is the first one at or after point in the source code buffer. Here are the Edebug commands for breakpoints:

b
Set a breakpoint at the stop point at or after point (edebug-set-breakpoint). If you use a prefix argument, the breakpoint is temporary (it turns off the first time it stops the program).
u
Unset the breakpoint (if any) at the stop point at or after point (edebug-unset-breakpoint).
x condition RET
Set a conditional breakpoint which stops the program only if condition evaluates to a non-nil value (edebug-set-conditional-breakpoint). With a prefix argument, the breakpoint is temporary.
B
Move point to the next breakpoint in the current definition (edebug-next-breakpoint).

While in Edebug, you can set a breakpoint with b and unset one with u. First move point to the Edebug stop point of your choice, then type b or u to set or unset a breakpoint there. Unsetting a breakpoint where none has been set has no effect.

Re-evaluating or reinstrumenting a definition forgets all its 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.

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.

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.


Go to the first, previous, next, last section, table of contents.