accessing local variables from the pdb debugger

Lie Ryan lie.1296 at gmail.com
Thu Dec 10 16:02:53 EST 2009


On 12/11/2009 12:37 AM, Jean-Michel Pichavant wrote:
> Diez B. Roggisch wrote:
> By just inserting the print foo statement right after changing foo's
> value, I've rolled back the value to 'foo' ??? A hell of a wtf pdb
> feature !

Apparently it's fixed in 2.7 and 3.1

D:\Lie Ryan\Desktop>python27 d.py
 > d:\lie ryan\desktop\d.py(6)test()
-> print(foo)
(Pdb) foo = "bar"
(Pdb) pp foo
'bar'
(Pdb) c
bar

D:\Lie Ryan\Desktop>python27 d.py
 > d:\lie ryan\desktop\d.py(6)test()
-> print(foo)
(Pdb) foo = "bar"
(Pdb) c
bar




More information about the Python-list mailing list