I am in the middle of an ipython session. I downloaded the foo module which contains the foo.bar function. While working, I notice that foo.bar gives some strange output when I give it some input x , where x is a variable in my local ipython scope. I would like to examine the behavior in the debugger.
How to set breakpoint in foo.bar and run foo.bar(x) in the debugger?
I know about pdb.set_trace() , but I would need to open the foo module code to insert a breakpoint manually, save it, reload the module in ipython, etc. There must be a better way.
source share