I use ipdb fairly often in a way to just jump to a piece of code that is isolated i.e. it is hard to write a real script that uses it. Instead I write a minimal tes
The following worked for me:
import sys sys.exit()
On newer versions of ipython, as mentioned above and below, this doesn't work. In that case,
import os os._exit(0)
should still do the trick.