I'm trying to use the built-in elisp debugger, invoked by debug, and read the source code at the same time. Unfortunately, whenever I continue execution, with either c or d, the debugger jumps around to a different window -- to the previous window configuration, or some other one that it seems to prefer. It also seems to scroll the source buffers I have open around. This makes it difficult to use.

Is there a way to get it to stop doing so? Has anyone else observed this behavior?

  • 1
    Do you see the same thing if you start Emacs using emacs -Q? If so, please use M-x report-emacs-bug, providing a step-by-step recipe to reproduce the problem/annoyance. If not, bisect your init file to find the culprit. – Drew Jul 11 '19 at 14:48
  • 1
    @Drew It sounds as if that is the normal behavior with edebug-save-windows on. If he does not like that behavior he can switch it off by pressing W. (See my answer.) – Tobias Jul 11 '19 at 19:40
  • @Tobias: OK; thx. (I use the regular debug debugger, and in a dedicated window (frame).) – Drew Jul 11 '19 at 19:50
  • @Tobias not sure, edebug doesn't use d to continue. – npostavs Jul 11 '19 at 23:59
  • @npostavs Okay, thanks for the hint. The OP should clarify what he actually uses. – Tobias Jul 12 '19 at 2:44

I think this behaviour is fine. When executing the next command, the window configuration should be the same as at the moment of break.

Imagine debugging some function whose next step is thing-at-point. By moving point to different location one can completely ruine debug session. So debugger is restore point position and window configuration for us.

Another frame may be helpful for you. Just C-x 5 2 when entered debugger and use that new frame to observe source code while the original frame will be used to command execution.

Also see the recursive editing documentation. Debugger is a recursive editing level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.