Alex Rivera | Logout

Emacs - how to see/how to debug a single elisp function/emacs command

Asked 2011-11-25T19:38:06.787
20

There is one thing that I don't like on table function in Org-mode for emacs. I would like to see all the functions that get executed by function that I run as Emacs command.

What is the best way to do that? Any tips how to get started with debuging elisp code, especially single command of interest?

Edit
Report

1 Answer

17

I prefer the traditional Emacs debugger to edebug. To use it:

M-x debug-on-entry the-function RET

Then, whenever the-function is invoked, the debugger is entered. Use d to step through the evaluation, and c if you want to skip through a step (not dive into its details.

It helps to view the definition of the-function in another window/frame while you step through it.

You can cancel debug-on-entry using M-x cancel-debug-on-entry.

answered 2011-11-27T18:04:55.160

Your Answer