views:

177

answers:

2

I don't know why I'm having so much trouble groking the documentation for the elisp debugger.

I see it has a commands to "step-into" (d). But for the life of me, I cannot see a step-out or step-over.

Can anyone help?

If I have this in the Backtrace buffer:

Debugger entered--returning value: 5047
  line-beginning-position()
* c-parse-state()
* byte-code("...")
* c-guess-basic-syntax()
  c-show-syntactic-information(nil)
  call-interactively(c-show-syntactic-information)

...where do I put the cursor, and what key do I type, to step out of the parse-state() fn ? by that I mean, run until that fn returns, and then stop in the debugger again.

+1  A: 

'c' and 'j' work kind of like a step-out and step-over. When a flagged frame (indicated by "*") is encountered (the docs say "exited" but this doesn't seem to be how the debugger behaves), the debugger will be re-entered. When the top frame is flagged, they work like step-over; when it isn't, they work like step-out.

In your example backtrace, typing either will step out of line-beginning-position into c-parse-state. The frame flag should clear, so typing either a second time should step out of c-parse-state.

outis
+3  A: 

When debugging, I press ? and I see:

o               edebug-step-out
f               edebug-forward-sexp
h               edebug-goto-here

I believe o (it is step-out) and f (like step over) are what you're looking for, though I also find h extremely useful.

Trey Jackson
I know you're gonna find this hard to believe, but I Was using debug, not edebug. What a difference! thanks for the tip.
Cheeso
@Cheeso, ha! I didn't even know there was a `M-x debug` until your question.
Trey Jackson
You were better off, not knowing. debug is impossible to use.
Cheeso