ipdb icon indicating copy to clipboard operation
ipdb copied to clipboard

tab completion for the expression after “p”/“pp” command

Open FranklinYu opened this issue 3 years ago • 6 comments

In pdb, when I type p foo before hitting Tab, it finds all variables in scope with prefix foo, like foobar. In ipdb it shows wrong completion (magic functions). This feature is useful because I’m used to print variables with p/pp command (to avoid collision between variables and commands).

FranklinYu avatar Feb 13 '22 09:02 FranklinYu

ipdb is a light wrapper around IPython debugger.

Could you file that issue in their repository ?

gotcha avatar Feb 16 '22 09:02 gotcha

Please correct me if I’m wrong, but I thought p is ipdb specific? I don’t think IPython provides that command.

FranklinYu avatar Feb 17 '22 03:02 FranklinYu

As far as I know, p is available in IPython debugger. It is not provided by ipdb.

What I am trying to say is that the debugger is provided by IPython. ipdb is only a convenient API to access that debugger.

gotcha avatar Feb 17 '22 11:02 gotcha

p is available in IPython debugger.

How can I verify that? I assume that I’m not supposed to fire the p command right after entering the IPython environment. Do I need to “enter the debug mode” in IPython?

The IPython official documentation didn’t mention how to get in a debugger REPL environment (or I must have missed it).

FranklinYu avatar May 16 '22 01:05 FranklinYu

What is your usual way to get into pdb ? In order to hopefully help you to do the same with ipdb ?

gotcha avatar May 16 '22 08:05 gotcha

Here is a resource that might help: https://switowski.com/blog/ipython-debugging/

gotcha avatar Dec 13 '22 20:12 gotcha