Jis*_*Yoo 5 debugging emacs elisp
C-u C-M-x
使用edebug检测评估defun表单.我能以编程方式执行此操作吗?我想这样做是因为我想写一个以下形式的elisp文件:
;;; define a function with edebug instrumented.
...
;;; do something that invokes the function with particular arguments.
...
Run Code Online (Sandbox Code Playgroud)
然后我可以运行emacs -q --load
那个elisp文件,逐步执行代码,了解有关错误的进一步调查,在我原来的emacs会话中编辑elisp文件,emacs -q --load
再次运行它,然后重复.
在~/test.el
:
(defun square (x)
(* x x))
Run Code Online (Sandbox Code Playgroud)
在~/testtest.el
:
(with-current-buffer (find-file-noselect "~/test.el")
(re-search-forward "square")
(edebug-defun))
(square 5)
Run Code Online (Sandbox Code Playgroud)
在bash
:
emacs -q -l ~/testtest.el
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
99 次 |
最近记录: |