We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
foo.py
a = 1
./python -m pdb foo.py
Results in
./python -m pdb foo.py ./foo.py(1)<module>() -> a = 1 (Pdb) longlist 0 a = 1 (Pdb)
The line number should be 1 instead of 0.
1
0
This occurs because the longlist command uses inspect.getsourcelines, which returns 0 as the starting line number for modules.
longlist
inspect.getsourcelines
This bug was introduced in #101674.
main
inspect.getsourcelines()
Bug report
foo.pycontaininga = 1./python -m pdb foo.pyResults in
The line number should be
1instead of0.This occurs because the
longlistcommand usesinspect.getsourcelines, which returns0as the starting line number for modules.This bug was introduced in #101674.
Your environment
mainLinked PRs
inspect.getsourcelines()to return 1-based line numbers #103226