[IPython-user] Is there any plan about ipdb?

Fernando Perez Fernando.Perez at colorado.edu
Wed Nov 16 21:36:53 CST 2005

Hi Linsong,

Linsong wrote:
> Hi,all
>    I have used ipython for more than one year and I like it very much, 
> it help me to make my life easier, many many thanks to the developers!
>    I post a feature request, now when I am under ipython, everythink is 
> wonderful, like syntax highlight, tab-completion and many very useful 
> magic commands, but when I go into pdb, it seems like I go back to the 
> origial python console world. Since now we have ipython instead of 
> python, why not create ipdb instead pdb? that will make it perfect!
>    Anyway, thanks again!

Well, I also hate the limitations of pdb, which I use quite often.  The 
problem is that pdb is based on the cmd module, which is fairly different 
architecturally from ipython (based on the code module). So mapping one onto 
the other is not too easy, and it would require almost a rewrite.

The cmd module is great for quick-and-dirty mini-shells with a few commands, 
but IMO it was the wrong design to use for an interactive python debugger, 
which is meant to run full python code.  It would have been much better if pdb 
had been written based on code, with the necessary extensions for frame handling.

Unfortunately the pdb we have works 'OK', so the incentive for writing a whole 
new one isn't that great.

An interesting project would be to implement an ipython which inherits from 
Bdb (the base class that pdb uses for core debugging functionality), but uses 
magics for control.  This would solve the problem which pdb has of name 
collisions between commands and locals, for example (magics have a 
disambiguation syntax).

But as you can imagine, right now this is very low on the priority list.  I 
have a stack of patches to take care of, and two branches where major new work 
was done over the summer, waiting to be reactivated.  So this is something 
which unfortunately won't come from me, at least for a while.  I'd love to 
have it, but I can live with the limitations of pdb.



More information about the IPython-user mailing list