Previous: Global Break Condition, Up: Breakpoints [Contents][Index]
Since all breakpoints in a definition are cleared each time you
reinstrument it, you might rather create an embedded breakpoint
which is simply a call to the function edebug.  You can, of
course, make such a call conditional.  For example, in the fac
function, insert the first line as shown below to stop when the argument
reaches zero:
(defun fac (n)
  (if (= n 0) (edebug))
  (if (< 0 n)
      (* n (fac (1- n)))
    1))
When the fac definition is instrumented and the function is
called, Edebug will stop before the call to edebug.  Depending on
the execution mode, Edebug will stop or pause.
However, if no instrumented code is being executed, calling
edebug will instead invoke debug.  Calling debug
will always invoke the standard backtrace debugger.