2013-09-02 3 views
4

C-u C-M-x은 edebug가 장착 된 defun 양식을 평가합니다. 프로그래밍 방식으로 할 수 있습니까?edebug를 프로그래밍 방식으로 트리거하거나 계측하는 방법은 무엇입니까?

;;; define a function with edebug instrumented. 
... 


;;; do something that invokes the function with particular arguments. 
... 

그때 내가 그 elisp 파일에 emacs -q --load을 실행 코드를 단계별로 수, 버그, 편집에 추가 조사에 대한 아이디어를 얻을 : 나는 다음과 같은 형식의 elisp 파일을 쓰기를 원하기 때문에 그렇게 할 원래 emacs 세션의 elisp 파일을 다시 실행하여 emacs -q --load을 실행하고 반복하십시오.

답변

3

~/test.el에서 :

(defun square (x) 
    (* x x)) 

~/testtest.el에서 :

(with-current-buffer (find-file-noselect "~/test.el") 
    (re-search-forward "square") 
    (edebug-defun)) 
(square 5) 

bash에서 :

emacs -q -l ~/testtest.el 
관련 문제