Skip to content
This repository was 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

Description

@RamonGiovane

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions