Python debugger

Syver Enstad syver-en+usenet at online.no
Mon Aug 4 01:16:25 CEST 2003


mis6 at pitt.edu (Michele Simionato) writes:

> Syver Enstad <syver-en+usenet at online.no> wrote in message
> news:<u3cgjbxrr.fsf at online.no>...
> 
> > Dave Kuhlman <dkuhlman at rexx.com> writes:
> > 
> > > Andrew Chalk wrote:
> > > 
> > > > I am sure that it has been asked before but could someone tell a
> 
> > > > newbie whether there is a Python debugger out there?
> > > > 
> > > 
> > > See:
> > > 
> > >     http://www.python.org/doc/current/lib/module-pdb.html
> > 
> > And in case you don't like using a commandline debugger, you can use
> 
> > pythonwin's debugger or Emacs together with pdb.
> 
> How do I use pdb with emacs? Do you have any reference?

Yes, in my head ;-)

You basically just do Meta-x and write pdb in the mini-buffer. Emacs
queries you for a commandline and off you go. The pdb support is an
integrated part of Grand Unified Debugger so that the same menus,
shortcut keys applies across all suported debuggers.

If you are running windows there are two different problems you will have to
solve before pdb will work. 

1: The regexp that pdb uses to match the filenames (so that it can
popup the file that the instruction pointer is in) is wrong for paths
under windows. I am not sure if this is fixed in the latest emacs
release (don't think so).

2: NT Emacs has problems with python buffering stdin and stdout, this
causes the GUD-PDB statemachine to get into a bad state.

I have made some miscelleanous extension to GUD-PDB, like visual
breakpoints, enabling more items in the GUD menu and more.

-- 

Vennlig hilsen 

Syver Enstad




More information about the Python-list mailing list