How to print all variables values when debugging Python with pdb, without specifying each variable?
I'm debugging my Python scripts using pdb and the manual says I can use p variables command to print the values of the specified variables at a certain point. But what if I had lots of variables, like 20 variables, and I would like to track the value of all of them? How do I print all of them without specifying each one manually? Take for example this script: a = 1 b = 2 c = 3 I can debug it with pdb and print all of them using p a, b, c like this: $ python -m pdb test.py > /media/test.py(1)<module>() -> a = 1 (Pdb) n > /media/test.py(2)<module>() -> b = 2 (Pdb) n > /media/test.py(3)<module>()