Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor can only be at end of line in ipdb #8538

Closed
Stargrazer82301 opened this issue Jan 8, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@Stargrazer82301
Copy link

commented Jan 8, 2019

Problem Description

When using ipdb in the ipython console, the cursor can only be at the end of the current console line. This prevents basic functionality.

What steps reproduce the problem?

  1. Run any script with a pdb.set_trace() call in it.
  2. Paste a line of code into the ipython console when ipdb has started.
  3. Press left-arrow. The cursor does not move.

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

I expect to be able to move the cursor. The cursor does not move. This makes it impossible to edit things in the middle of a line in the ipdb console (without pressing backspace to get to the bit you want to edit, deleting everything after that point). It also makes it impossible to copy bits of code from the ipdb history in the ipython console; as soon as you select the bit of code you want to copy, the cursor immediately snaps back to the end of the current input line before you've had a chance to press 'copy'.

Versions

  • Spyder version: 3.3.2
  • Python version: 3.7.0
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: Mac OS High Sierra

Dependencies

IPython >=4.0 : 7.2.0 (OK)
cython >=0.21 : 0.29.2 (OK)
jedi >=0.9.0 : 0.13.2 (OK)
matplotlib >=2.0.0: 3.0.2 (OK)
nbconvert >=4.0 : 5.4.0 (OK)
numpy >=1.7 : 1.15.4 (OK)
pandas >=0.13.1 : 0.23.4 (OK)
psutil >=0.3 : 5.4.8 (OK)
pycodestyle >=2.3 : 2.4.0 (OK)
pyflakes >=0.6.0 : 2.0.0 (OK)
pygments >=2.0 : 2.3.1 (OK)
pylint >=0.25 : 2.2.2 (OK)
qtconsole >=4.2.0 : 4.4.3 (OK)
rope >=0.9.4 : 0.11.0 (OK)
sphinx >=0.6.6 : 1.8.2 (OK)
sympy >=0.7.3 : 1.3 (OK)

@ccordoba12

This comment has been minimized.

Copy link
Member

commented Jan 9, 2019

This is one of the many limitations of ipdb. We plan to address them with a new debugger in Spyder 4, but for now there's nothing we can do about it.

@mrclary

This comment has been minimized.

Copy link

commented May 2, 2019

This seems to be an issue with qtconsole, not Spyder. Not sure which versions are affected, but at least 4.4.3.

From a clean console

In [1]: raise RuntimeError()                                                                        
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-1-38bb3ecd1e57> in <module>
----> 1 raise RuntimeError()

RuntimeError: 

In [2]: debug                                                                                       
> <ipython-input-1-38bb3ecd1e57>(1)<module>()
----> 1 raise RuntimeError()

ipdb> hello

Cursor is stuck at the end of the command line after pasting or typing.
This behavior does not manifest when starting iPython from a terminal

>>> ipython

but does manifest inside qtconsole

>>> jupyter qtconsole
@mrclary

This comment has been minimized.

Copy link

commented May 2, 2019

Yes. It appears that qtconsole 4.4.3 is the culprit. I downgraded to 4.4.2 and the issue does not manifest.

I happen to run my Spyder application from its own Anaconda environment. Note that the qtconsole version in the environment from which you run Spyder is the only important one. Attached is my environment file.
my_spyder_env.txt

@ccordoba12 ccordoba12 removed this from the v4.0beta3 milestone May 3, 2019

@ccordoba12

This comment has been minimized.

Copy link
Member

commented May 3, 2019

Yes. It appears that qtconsole 4.4.3 is the culprit. I downgraded to 4.4.2 and the issue does not manifest.

Yep, this is already fixed in master of qtconsole. I'll release 4.4.4 right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.