I had the same phenomenon on my Mac using ipython==0.13.2 and ipdb==0.7 inside a Python 2.7.5 virtualenv. When I tried to debug, I had the tab completion for the builtins, but not for the variables in the current scope. I discovered, that I had a custom .pdbrc located in my home folder (http://docs.python.org/2/library/pdb.html#id2). After I commented all the stuff out, the tab completion worked again.
I don't know when and why I added this file, but this is what was in there:
# See http://docs.python.org/2/library/pdb.html#id2 for the structure of this file.
import pdb
# 'inspect x' will print the source code for a method, class or function.
alias inspect import inspect;print inspect.getsource(%1)
alias i import inspect;print inspect.getsource(%1)
# 'help x' opens the man-style help viewer from the interpretter on an object
alias help !print help(%1)
alias h !print help(%1)
# For ordinary Python objects, ppo will pretty-print members and their values.
alias ppo pp %1.__dict__
# ppio runs ppo over a sequence of objects
alias ppio pp [a.__dict__ for a in %1]
# This tries to enable tab-completion of some identifiers.
!import rlcompleter
!pdb.Pdb.complete = rlcompleter.Completer(locals()).complete
# Taken from https://gist.github.com/1125049
# There are a couple of edge cases where you can lose terminal
# echo. This should restore it next time you open a pdb.
!import termios, sys
!termios_fd = sys.stdin.fileno()
!termios_echo = termios.tcgetattr(termios_fd)
!termios_echo[3] = termios_echo[3] | termios.ECHO
!termios_result = termios.tcsetattr(termios_fd, termios.TCSADRAIN, termios_echo)
Further research is needed to check what breaks the tab-completion in there...
Ubuntu 12.04, ipython and ipdb also installed via pip. The problem occurs inside as well as outside a virtual environment. I get tab completion though but only on built-in function/keywords (e.g. when I create adic = {}in my code then go into debugging viaipdb;ipdb.set_trace()and typedi, presstabI only seedict(,dir(anddivmod(. I can't seedic.) - Bentley4%debuginside IPython, but it doesn't work when I run my test suite and break with ipdb - Anentropicpython -m ipdb my_script.pybasically gets the job done for me ... just hiscat the first debug break, and then all is well. I understand this is just a work around, but its a pretty minor irritant to what is my favorite Python package. - Pete Cacioppi