using python debugger (pdb) inside emacs debugger mode ...

Charles G Waldman cgw at fnal.gov
Tue Sep 14 12:40:40 EDT 1999


Philip Lijnzaad writes:
 > Does anyone have experience with using M-x pdb inside emacs? 

A while ago I submitted patches to the XEmacs maintainers to make this
all work smoothly in XEmacs, which, as of XEmacs version 21, it does.
I have no idea about FSF Emacs, some additional work may be necessary.
If I get some time I'll put up an FSF Emacs installation and give it a
whirl, but don't hold your breath!


 > M-x pdb gives:
 > 
 >   run pdb (like this): pdb 
 > 
 > which doesn't work, as pdb is not defined. Running it like 
 > 
 >   python /usr/local/lib/python1.5/pdb.py ~/python/test.py args 
 >
 > does not work either, since it chdir()'s to /usr/local/lib/python1.5/ and
 > also strangely doesn't expand the ~ to "/my/home/dir". If I hand-expand it,
 > it will only synchronize with the source if I give a few 's' commands, but
 > then it gets stuck when stepping into a module that it can't find because
 > os.getcwd() is wrong.
 > 
 > Aaarggh! what am I doing wrong? Any comments appreciated!
  

I'd suggest at the very least to make a symlink to
/usr/local/lib/python1.5/pdb.py called something like
/usr/local/bin/pdb, (somewhere along your $PATH), and make sure the
file is executable and has the right #!/ magic at the top.

That might just be enought to get you there.





More information about the Python-list mailing list