Spyder: Enable command history and autocompletion when using ipdb (IPython debugging)

Created on 4 Nov 2015  路  7Comments  路  Source: spyder-ide/spyder

Description

What steps will reproduce the problem?

  1. Use the IPython console
  2. Start debugging a script using Ctrl+F5 (you might have to set a breakpoint to stop the script from completing and the debugging session to end)
  3. Run any command in the IPython/ipdb console, e.g. a = 2
  4. Observe that you can't use the Up/Down arrow keys for the command history, and that autocompletion is disabled (e.g. write the name of some class/instance, a dot, and press Tab or Ctrl+Space, and nothing happens)

What is the expected output? What do you see instead?

I expect command history and autocompletion to work when debugging. Preferably also multiline input (for loops, function definitions, etc.) but that might be another beast for all I know.

Note that command history and autocompletion works in the standard console (not IPython) where pdb is used. Multiline input does not work in either of the consoles.

Version and main components

  • Spyder Version: 2.3.7
  • Python Version: 2.7.10
  • Qt Versions: 4.8.6, PyQt4 (API v2) 4.10.4 on Windows

    Optional dependencies

pyflakes >=0.5.0   :  0.8.1 (OK)
pep8 >=0.6         :  1.6.2 (OK)
pygments >=1.6     :  2.0.2 (OK)
IPython >=1.0      :  3.0.0 (OK)
zmq >=2.1.11       :  14.5.0 (OK)
pandas >=0.13.1    :  0.16.1 (OK)
sphinx >=0.6.6     :  1.2.3 (OK)
rope >=0.9.2       :  0.9.4 (OK)
jedi >=0.8.1;<0.9.0:  0.8.1 (OK)
matplotlib >=1.0   :  1.4.2 (OK)
sympy >=0.7.3      :  0.7.6 (OK)
pylint >=0.25      :  1.4.1 (OK)

Most helpful comment

Is there an alternative, not using spyder, that gives autocompletion and history commands with page up? It's so fundamental with the literally thousands of attributes that are below the instances one has to deal with, that it severely hinders progression with debugging. Is then really nobody able to solve this longstanding issue? I hope there is. I hope we will one day reach the debugging power that Matlab has been offering its users for more than two decades. Sincerely.

All 7 comments

Sorry, but that's something we can't do in Spyder. It's a limitation of the IPython/Jupyter architecture.

We are thinking to workaround that limitation in a future version of Spyder (not 3.0 for sure ;-)

Is there an alternative, not using spyder, that gives autocompletion and history commands with page up? It's so fundamental with the literally thousands of attributes that are below the instances one has to deal with, that it severely hinders progression with debugging. Is then really nobody able to solve this longstanding issue? I hope there is. I hope we will one day reach the debugging power that Matlab has been offering its users for more than two decades. Sincerely.

You can use IPython in a system terminal to have browsing and completion features.

For Spyder we have some plans to fix this in 4.0

This issue is concerning to me too, as Spyder looks to be migrating away from the standard console and going to only IPython. That works great right up until you need to interactively debug, but not having the up arrow for previous commands or tab completion makes it completely worthless, and I usually switch back to the default pdb console.

It's true we're going to remove the Python console. However, we're already working on a better debugger for the IPython console.

People who really need the current functionality can simply keep using the Spyder version that works for them until we release Spyder 4.

Yes, it is.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

goanpeca picture goanpeca  路  3Comments

cchu08 picture cchu08  路  3Comments

hgijeon picture hgijeon  路  3Comments

danieltomasz picture danieltomasz  路  3Comments

gabrielclow picture gabrielclow  路  3Comments