I was trying to get the interactive ipython which can also make use of auto-complete by doing the following but somehow I see it starting ipdb instead and not being able to make use of auto-complete.
pip install ipython pyreadline
export PYTHONBREAKPOINT=IPython.core.debugger.set_trace
# add breakpoint() somewhere inside the code
python whatever.py
The result is that ipdb is started, and pressing TAB will not do any auto-completes.
ipdb>
In fact the outcome looks the same as doing export PYTHONBREAKPOINT=ipdb.set_trace which is quite weird.
If I start ipython manually it works fine and auto-complete works.
What am I doing wrong?
What version of Python/IPython/IPDB do you have? Where are you running them?
It's hard to know without additional context, but I do know that even when fully functioning, hitting
TABwhen the cursor is in the first position on the command line in either IPython or IPDB will indent, not tab complete, even if there are other characters present.If you type
disand thenTAB, you should see something like the following:There are other possibilities. I've seen things get weird, for example, if one's
TERMis set to something simple or esoteric (see, e.g.,TERM=ansiorTERM=rxvt), if one doesn't have a fully-functional terminal to begin with, if one redirects/messes with STDIN/STDOUT (or has other tools interacting with those; see, e.g., this issue where IPython/IPDB have weird interactions withpython -m doctest), etc.I've also seen disparities between when
PYTHONBREAKPOINTis set toipdb.sset_traceoripdb.set_trace(tab completion works) and when it's set toIPython.core.debugger.set_trace(behaves like a dumb terminal).