www.delorie.com/gnu/docs/elisp-manual-21/elisp_241.html   search  
Buy the book!

GNU Emacs Lisp Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Source Breakpoints

All breakpoints in a definition are forgotten each time you reinstrument it. If you wish to make a breakpoint that won't be forgotten, you can write a source breakpoint, which is simply a call to the function edebug in your source code. You can, of course, make such a call conditional. For example, in the fac function, you can 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)))

When the fac definition is instrumented and the function is called, the call to edebug acts as a breakpoint. Depending on the execution mode, Edebug stops or pauses there.

If no instrumented code is being executed when edebug is called, that function calls debug.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003