0

M-x pdb is great while debugging. When the python process exits though, often there is a traceback left behind in the gud buffer that I'd like to view using compilation-mode so I can use next-error to step through the stack frames.

I can always M-x compilation-mode on python exit. Can I have emacs automatically do that for me?

3
  • In realgud (available from MELPA), the way this is handled is that there is a function realgud:goto-lang-backtrace-line bound to C-C ! ! So you just position yourself on the traceback line and that enter C-C !! and the location will come up in another bugger.
    – rocky
    Commented Oct 21, 2015 at 17:23
  • Another what? This is more than 15 characters long. Commented Nov 21, 2015 at 16:37
  • bugger->buffer (or rather buffer window in the same display).
    – rocky
    Commented Nov 21, 2015 at 18:11

1 Answer 1

0
(defun my/turn-on-compilation-shell-minor-mode ()
  (compilation-shell-minor-mode t))
(add-hook 'pdb-mode-hook #'my/turn-on-compilation-shell-minor-mode)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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