Wednesday, October 15, 2014

Debugging in iPython

To debug a function func in module mod.py, do the following at the iPython prompt.
from IPython.core.debugger import Pdb
ipdb = Pdb()
import mod
ipdb.runcall(mod.func, [args, for, func])

This will start the iPython debugger at the first line of func.

No comments:

Post a Comment