As I know, %debug magic can do debug within one cell.
%debug magic
However, I have function calls across multiple cells.
For example,
In[1]:
You can always add this in any cell:
import pdb; pdb.set_trace()
and the debugger will stop on that line. For example:
In[1]: def fun1(a): def fun2(a): import pdb; pdb.set_trace() # debugging starts here return fun2(a) In[2]: fun1(1)