[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How do I get edebug online?
From: |
Davin Pearson |
Subject: |
How do I get edebug online? |
Date: |
Tue, 18 Jan 2022 11:28:18 +1300 |
First I eval the following sexp:
(setq edebug-all-defs t)
Then I issue the following command on the following code which resides
in a file called:
~/java-training-wheels/dlisp/coolmacs/dmp-grep--splat-file.el.
The command is \C-\M-x. The file contains the following defun:
(defun fac (n)
(when (= 5 n)
(message "Foo bar")
(edebug)
(message "Rita Hayworth"))
(if (< 0 n)
(* n (fac (1- n)))
1))
Execute the following command:
(fac 10)
and it comes back at you with the following backtrace: (see after this
backtrace for my question)
Debugger entered: nil
apply(debug nil nil)
edebug()
(progn (message "Foo bar") (edebug) (message "Rita Hayworth"))
(if (= 5 n) (progn (message "Foo bar") (edebug) (message "Rita
Hayworth")))
fac(5)
(* n (fac (1- n)))
(if (< 0 n) (* n (fac (1- n))) 1)
fac(6)
(* n (fac (1- n)))
(if (< 0 n) (* n (fac (1- n))) 1)
fac(7)
(* n (fac (1- n)))
(if (< 0 n) (* n (fac (1- n))) 1)
fac(8)
(* n (fac (1- n)))
(if (< 0 n) (* n (fac (1- n))) 1)
fac(9)
(* n (fac (1- n)))
(if (< 0 n) (* n (fac (1- n))) 1)
fac(10)
eval((fac 10) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
My question is this:
How do I go about typing g (goto next breakpoint)
Do I need to pop the stack and go back to the top level?
Do I enter the command g in the *Backtrace* window?
or in the file window
~/java-training-wheels/dlisp/coolmacs/dmp-grep--splat-file.el
How do I go about printing out "Rita Hayworth" ? I have searched my
*Messages* buffer but I have not found Rita Hayworth anywhere. Judging
from the Elisp manual it seems that I need to type in the "g" command but I
am perplexed at where I need to issue this command!
- How do I get edebug online?,
Davin Pearson <=
Re: How do I get edebug online?, Michael Heerdegen, 2022/01/17