Emacs python mode and pdb.. shouldn't they cooperate??

Syver Enstad syver-en+usenet at online.no
Mon Feb 11 12:10:24 EST 2002


Andrew Markebo <flognat at flognat.myip.org> writes:

> Hey emacs lovers!
> 
> How do you debug in your emacs?? Or you don't need to?? Once upon a
> time, long, long ago I ported the xemacs gud-back/frontend, whatever
> to emacs, but it is uncosy to use.. 

I don't get the regular support for pdb to work either. But that is
not a real problem to me as the latest version of python-mode (which
you can find on www.python.org) has a feature known as pdb-track.

This works by looking out for the  "(Pdb)" prompt in a shell or
python-shell window and kicking in from there. The pdb track feature
will show the current source file with a little arrow in the fringe
pointing to the current source line. You can use pdb as normal with
text commands in the shell or python-shell, and pdbtrack shows right
source line at all times. Works great, if you want to add your
favorite shortcut keys for stepping in, out, over and so on just add
them to the py-shell-map and map them to inserts of the commands that
does these things in pdb.

The only thing I really miss is setting breakpoints directly in the
source code, which would make python mode almost complete.

-- 

Vennlig hilsen 

Syver Enstad



More information about the Python-list mailing list