bph
bph

Reputation: 11258

python debugging in emacs with gud-gdb type functionality

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

Upvotes: 2

Views: 965

Answers (1)

reteptilian
reteptilian

Reputation: 923

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)

Upvotes: 1

Related Questions