'VS Code run ipython in debug console

Is there a way to run an ipython like debug console in VC Code that would allow tab completion and other sort of things?



Solution 1:[1]

Meanwhile, I have become a big fan of PDB++ debugger for python. It works like the iPython CLI, so I think the question has become obsolete specifically for me, but still may have some value for others.

Solution 2:[2]

It seems this is a desired feature for VS Code but not yet implemented. See this post: https://github.com/DonJayamanne/vscodeJupyter/issues/19

I'm trying to see if one could use the config file of VS Code to define an ipython debug configuration e.g.:

{ "name": "ipython", "type": "python", "request": "launch", "program": "${file}", "pythonPath": "/Users/tsando/anaconda3/bin/ipython" }

but so far no luck. You can see my post in the above link.

Solution 3:[3]

No, currently (unfortunately) not. Here's an ongoing thread about this on github. The issue has P1 status, so will hopefully be implemented soon: https://github.com/microsoft/vscode-python/issues/6972

Solution 4:[4]

the vscode debug console does allow for auto completion ... however, I am not sure if what you wanted was a way to trigger your code from an ipython shell, if so. you can start ipython like so,

python -m debugpy --listen 5678 `which ipython`

now you can connect to this remote debugger from vscode.

Solution 5:[5]

For tab completion you could install pyreadline3:

python -m pip install pyreadline3

This is not neccessary on Linux, but on Windows it is.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 El Dude
Solution 2 tsando
Solution 3 ihopethiswillfi
Solution 4 Pykler
Solution 5 Spartan