On 8/14/2013 12:36 PM, Prasad, Ramit wrote:
chandan kumar wrote:
Is there a way to validate variable values while debugging any python code.
In addition to pdb, I would imagine most Python IDEs would support debugging in
this manner.
Idle also has a debugger. It uses the same bdb base debug module as pdb.
One turns it on (or off) in the Shell window. Then run code from an
editor window. For your example (which lacked the ':')
---
def method():
a = 20
b =30
c = a + b
return
method()
---
I added the return so the debugger would pause there after calculating
c. The method has to be called in order to step into the body during
execution. One can also set breakpoints in the editor, though I have
never tried that.
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list