using emacs pdb with a running python process?

Karl Anderson kra at monkey.org
Fri Jun 23 16:43:37 EDT 2000


Has anyone been able to attach a pdb-mode buffer to a python process
that is already running?  As in, typing this into an existing py-shell
buffer:

>>> import pdb; import foo
>>> pdb.run('foo.function()')

and having all of the pdb/gud features - the foo.py buffer follows
where the debugger is, etc.

pdb.el, and the gud commands that they're on top of, want to accept a
command line & run that in a shell.  I got frustrated trying to take
out the command parts so I could just turn a py-shell buffer into pdb
mode.

I want to do this so I can debug zope, which has the pdb.run command
buried in a script, so I'd like to be able to switch to pdb mode
manually.

-- 
Karl Anderson      kra at monkey.org           http://www.pobox.com/~kra/



More information about the Python-list mailing list