Is there a mechanism for clearing all breakpoints (remove instrumentation en masse) so as to avoid the need to manually run eval-defun
on each instrumented function's definition?
Consensus seems to be that there is no such function built-in.
Since edebug instrumentation data is stored on the target symbols, I have been using the following basic function:
(defun ebpa/edebug-remove-all-instrumentation ()
"Remove all edebug instrumentation by visiting each function
definition and running `eval-defun`."
(interactive)
(mapatoms
(lambda (symbol)
(when-let (pos (car-safe (get symbol 'edebug)))
(with-current-buffer (marker-buffer pos)
(goto-char (marker-position pos))
(eval-defun nil))))))
edebug-instrument-function
shows that the function is not instrumented if(get symbol 'edebug)
is a marker and the function is instrumented if(get symbol 'edebug)
is a cons. Currently your version ofedebug-remove-all-instrumentation
evals defuns of uninstrumented functions if they have been instrumented before. – Tobias Apr 18 '17 at 18:44