-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
pdb shows wrong line numbers for modules #103225
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
Labels
type-bug
An unexpected behavior, bug, or error
Comments
artemmukhin
added a commit
to artemmukhin/cpython
that referenced
this issue
Apr 3, 2023
iritkatriel
pushed a commit
that referenced
this issue
Apr 7, 2023
Co-authored-by: Artem Mukhin <[email protected]>
warsaw
pushed a commit
to warsaw/cpython
that referenced
this issue
Apr 11, 2023
Co-authored-by: Artem Mukhin <[email protected]>
gaogaotiantian
added a commit
to gaogaotiantian/cpython
that referenced
this issue
May 7, 2023
Co-authored-by: Artem Mukhin <[email protected]>
iritkatriel
pushed a commit
that referenced
this issue
May 7, 2023
Thanks for reporting! Closing, since the pdb issue is fixed and #103319 can track whether we want to change behaviour in inspect or not |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
foo.py
containinga = 1
./python -m pdb foo.py
Results in
The line number should be
1
instead of0
.This occurs because the
longlist
command usesinspect.getsourcelines
, which returns0
as the starting line number for modules.This bug was introduced in #101674.
Your environment
main
Linked PRs
inspect.getsourcelines()
to return 1-based line numbers #103226The text was updated successfully, but these errors were encountered: