Debugging python code with ipdb

Tried a couple of ways to debug python code, including using the %pdb magic within IPython or use %debug in the postmortem mode. Still couldn't figure out how to restart the code within the pdb invoked by the pdb magic without pdb raising a "restart" error.

So I think ...

more ...