2

Is it possible to set up a python debugging environment in emacs to mimic that provided by gud-gdb when debugging C?

e.g. the ability to set a breakpoint with pdb.set_trace() and have a arrow annotation in the relevant source code file highlighting your progress as you step into/over statements and functions

I'm really missing this functionality when trying to debug python code after a bout of C debugging, all from within emacs

1 Answer 1

1

Yes, that functionality exists and should be working if you are in python mode. Does emacs indicate that you have python mode active?

Note with emacs 24x and the regular M-x shell you may need to add a hook as described here. It will work out of the box if you run with the M-x python-shell-send* commands.

I haven't tried pdb++ but that might be an alternative for you to try. See the answer here: Emacs: using pdbtrack (python.el)

Sign up to request clarification or add additional context in comments.

2 Comments

ahh i'm on 24.3.1 - have you fixed for this ver or did you revert back to 23?
I found it actually works if you run your python script using M-x python-shell-send-file but not when you run inside a regular M-x shell. I posted a question on it since I need to use M-x shell.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.