Skip to content

pdb debugger command <ll> (longlist shows wrong current line in python versions 3.10, 3.11 #104207

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

Closed
Th1sUs3rH4sN0N4m3 opened this issue May 5, 2023 · 2 comments
Assignees
Labels
OS-mac pending The issue will be closed if no feedback is provided stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@Th1sUs3rH4sN0N4m3
Copy link

Th1sUs3rH4sN0N4m3 commented May 5, 2023

In python version 3.10 and 3.11 pdb debugger has a bug. If you run python3.11 -m pdb ./your_file_name.py, you will see next

(venv) user@laptop% python3.11 -m pdb ./main.py
> Path/to/file/main.py(1)<module>()
-> a = 10
(Pdb) 

if you type command l (list) you wiil get

(Pdb) l
  1  -> a = 10
  2     b = a + 5
  3     c = a + b
  4     
  5     print(c)
[EOF]
(Pdb) 

But if you type ll (long list), you will see next

(Pdb) ll
  0     a = 10
  1  -> b = a + 5
  2     c = a + b
  3     
  4     print(c)
(Pdb) 

you can see cursor '->' show different positions.
I reproduced it for version 3.10 and 3.11
In python version 3.8 everything is fine. There is no problem. The position is the same.

My environment

Macos Monteray 12.6.5 CPU Intel

python 3.11
python 3.10
python 3.8

@Th1sUs3rH4sN0N4m3 Th1sUs3rH4sN0N4m3 added the type-bug An unexpected behavior, bug, or error label May 5, 2023
@gaogaotiantian gaogaotiantian self-assigned this May 5, 2023
@gaogaotiantian gaogaotiantian added the stdlib Python modules in the Lib dir label May 5, 2023
@gaogaotiantian
Copy link
Member

I believe this is fixed by #103265 . 3.10 stopped taking bug fixes now, I don't know why it was not ported back in 3.11. I'll label this as pending for now.

@gaogaotiantian gaogaotiantian added the pending The issue will be closed if no feedback is provided label May 5, 2023
@gaogaotiantian
Copy link
Member

The fix is merged back in 3.11 #104262. Close as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac pending The issue will be closed if no feedback is provided stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants