Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Python debugger (pdb) does not handle keyboard arrows, home/end keys #381

Open
RamonGiovane opened this issue Jun 10, 2024 · 0 comments
Open

Comments

@RamonGiovane
Copy link

RamonGiovane commented Jun 10, 2024

The problem:

Whenever we place a breakpoint() and the test suite stops at an instruction we are not allowed to access the pdb command history with or .
We are also unable to move the cursor with , , Home or End which is really really frustrating.

Exemplification:

> /workspaces/ward/tests/test_testing.py(585)_()
(Pdb) when I hit arrow left it types ^[[D

> /workspaces/ward/tests/test_testing.py(585)_()
(Pdb) when I hit arrow right it types ^[[C

This is easily reproducible in a Github Codespace.

I read that this is generally solved by configuring the gnureadline. It's an OS dependency, but there's also has a python lib. I tried it and it made no effect on Ward. It can also vary from system to system which is awkward.

Possible solution:

I suggest we replace Ward's breakpoint hook from pdb to ipdb. Ipython has that fixed already, so we don't need to reinvent the wheel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant