As I know, %debug magic can do debug within one cell.
However, I have function calls across multiple cells.
For example,
In[1]:
Just type import pdb in jupyter notebook, and then use this cheatsheet to debug. It's very convenient.
c --> continue, s --> step, b 12 --> set break point at line 12 and so on.
Some useful links: Python Official Document on pdb, Python pdb debugger examples for better understanding how to use the debugger commands.
Some useful screenshots: