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]:
In Python 3.7 you can use breakpoint() function. Just enter
breakpoint()
wherever you would like runtime to stop and from there you can use the same pdb commands (r, c, n, ...) or evaluate your variables.