7

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?

  • 3
    The code of 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 of edebug-remove-all-instrumentation evals defuns of uninstrumented functions if they have been instrumented before. – Tobias Apr 18 '17 at 18:44
  • @Tobias Thanks for the observation! I've updated the function. – ebpa Apr 18 '17 at 18:52
6

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))))))
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.