Function: edebug-defun

edebug-defun is a function alias and interactive for edebug-eval-top-level-form, defined in edebug.el.gz.

Signature

(edebug-defun)

Documentation

Evaluate the top level form point is in, stepping through with Edebug.

This is like eval-defun except that it steps the code for Edebug before evaluating it. It displays the value in the echo area using eval-expression (which see).

If you do this on a function definition such as a defun or defmacro, it defines the function and instruments its definition for Edebug, so it will do Edebug stepping when called later. It displays Edebug: FUNCTION in the echo area to indicate that FUNCTION is now instrumented for Edebug.

If the current defun is actually a call to defvar or defcustom, evaluating it this way resets the variable using its initial value expression even if the variable already has some other value.
(Normally defvar and defcustom do not alter the value if there
already is one.)

View in manual

Probably introduced at or before Emacs version 19.20.

Key Bindings

Aliases

edebug-defun