[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
newbie: debugging elisp.
From: |
Pawel |
Subject: |
newbie: debugging elisp. |
Date: |
Wed, 24 May 2006 15:19:33 +0200 |
Hallo
In order to ask more precise questions related to problems with emacs packages
I decided to learn a bit how to debug elisp programs.
I started with edebug, because it also shows source code. I tried debugging
emacs tramp package.
I read three steps of edebug info pages, especially step about instrumenting
the code.
Unfortunatelly that manual is not clear for me.
----------- Problem 1: code instrumentation -----------
I did:
1) I set up in .emacs
(setq edebug-trace t)
(setq edebug-all-defs t)
(setq edebug-all-forms t)
2) restarted emacs
3) visited tramp.el file
4) M-x eval-current-buffer
Then I expected that call to any function that is in tramp.elc (I have compiled
sources) will invoke debug. Unfortunatelly it did not stop even once.
But when I figured out what is the actual tramp entry point
(tramp-file-name-handler), and then invoked M-x edebug-defun on that function
definition, and then rerun my tramp command, emacs execution stopped inside
that method.
My question is:
a) Do I understand bad, the way eval-current-buffer works ?
-------------- Problem 2: stepping into function -------------
As edebug stopped at tramp-file-name-handler, I stepped through that with
<SPC>. When I wanted to step into (`i') function called from
tramp-file-name-handler, I got the (example) message:
Don't know where tramp-find-foreign-file-name-handler is defined.
tramp-find-foreign-file-name-handler is defined in the same file as
tramp-file-name-handler (tramp.el).
Could You tell me, what I am doing wrong
Greetings
- newbie: debugging elisp.,
Pawel <=