The following worked for me:
import syssys.exit()
On newer versions of ipython, as mentioned above and below, this doesn't work.In that case,
import osos._exit(0)
should still do the trick.
I put the following in my .pdbrc
.pdbrc
import osalias kk os.system('kill -9 %d' % os.getpid())
kk kills the debugger and (the process that trigger the debugger).
kk
It's the problem with the recent version of IPython 5.1.0. You can check with your environment using the following code:
pip freeze | egrep -i '^i'
It will be resolved by downgraded to IPython==5.0.0.
pip install ipython==5.0.0
That works for me.