Skip to content. | Skip to navigation

Sections
Personal tools
What is this?
Hi, my name is Tom Lazar and I'm a Plone and Zope developer based in Berlin, Germany and this is my personal and professional (no big difference, really...) website.
 

pdp tab completion

Filed Under:

From the Small-Things-Big-Effect-Department

Yes!! YES!! (yes!) Perhaps I just haven't been asking the right people so far, but nobody I know uses pdb with tab completion. For me, tab completion is the productivity feature in debugging - until now I'd often even fire up a parallel instance of Ploneshell (oops, version 1.0 is out... gotta check that out, too!) and reproduce a pdb-session there manually by visiting the identical objects I'd be debugging just for introspection and tab completion. Well, this will no longer be necessary, due to this neat recipe by Stephen Emslie over at ASPN. Turns out, all you need to do is create a file named .pdbrc in your home folder with the following contents:

import rlcompleter
pdb.Pdb.complete = rlcompleter.Completer(locals()).complete

Voila! You now have tab completion on variables inside the scope of your pdb session, as well as completion of method names and class variables, yay! Can't wait to try it out for real on my current project.