python - Transfer Ipython namespace to ipdb -
i in middle of ipython session. i've loaded module foo contains function foo.bar. while working, notice foo.bar gives weird output when feed input x, x variable in local ipython scope. investigate behavior in debugger.
how set breakpoint @ foo.bar , run foo.bar(x) in debugger?
i know pdb.set_trace(), require me open code of foo module insert breakpoint manually, save it, reload module in ipython, etc. there has better way.
i believe can use pdb.runcall in case:
import pdb pdb.runcall(foo.bar, x)
Comments
Post a Comment