I know that a Python script can be debugged from the command line with
python -m pdb my_script.py
if my_script.py
is a script
You can add pdb.set_trace()
in your code for interactive debugging, before the code you want to debug.
class C:
def __init__(self, x):
self.x = x
def inst_f(self):
pass
a = C('this is a')
import pdb
pdb.set_trace()
b = C('this is b')
print a.x is b.x
Running this will output
> c:\python27\tests\test.py(11)()
-> b = C('this is b')
(Pdb)
And let you use python debugger.