C-u C-M-x
evaluates a defun form with edebug instrumented. Can I do that programmatically? I want to do that because I want to write an elisp file of the following form:
;;; define a function with edebug instrumented.
...
;;; do something that invokes the function with particular arguments.
...
then I can run emacs -q --load
on that elisp file, step through code, get an idea on further investigation on the bug, edit the elisp file in my original emacs session, run emacs -q --load
on it again, and repeat.
In ~/test.el
:
(defun square (x)
(* x x))
In ~/testtest.el
:
(with-current-buffer (find-file-noselect "~/test.el")
(re-search-forward "square")
(edebug-defun))
(square 5)
In bash
:
emacs -q -l ~/testtest.el
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With