This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Pdb can't use the commands through -c or .pdbrc files
Type: Stage:
Components: Library (Lib) Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Zrincet
Priority: normal Keywords:

Created on 2021-11-30 03:36 by Zrincet, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg407350 - (view) Author: Hozoy (Zrincet) Date: 2021-11-30 03:36
I have a python file:

def do_something():
    pass

def main():
    a = 1
    b = 2
    c = a+b
    print(f"c:{c}")
    pass

if __name__ == '__main__':
    main()

I run this command:

python -m pdb -c "b 5" -c "commands 1;;do_something();;end" -c "c" main.py

It doesn't work.
And I have a .pdbrc file

b 5
commands 1
do_something()
end
c

It doesn't work either.
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90095
2021-11-30 03:36:50Zrincetcreate