5

I would like to set breakpoint in the imported module and debug step by step from ipython.

I call separate function from ipython, not the whole module, so %run is not an option.

doubts
  • 1,763
  • 2
  • 12
  • 19

1 Answers1

4

See my blog entry for a full description.

In summary:

from IPython.core.debugger import Pdb
ipdb = Pdb()
ipdb.runcall(my_imported_function, args...)
Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895