Inside ipython you can use a magic command:
%run -d myapp.py
This will run the app inside ipython and as soon as it crashes it will fire ipdb right in place to inspect the crash. How can I force django runserver to fallback right away into ipdb/ipython after encoutering an error instead of displaying error page (of course I don’t need ipdb in browser – I’m talking about console I ran manage.py in)?
PS. I know about ipdb.set_trace() – I want the ipdb to be run automatically when an error occurs – this would be a real time saver!
You can use django-pdb. It’s very easy. The post mortem mode only is in a fork still