I am currently debugging a Django project which results in an exception. I would like to enter the ipdb
post-mortem debugger. I've tried invoking ipdb
as a script (cf. https://docs.python.org/3/library/pdb.html), but this just enters me to the first line of code:
> python -m ipdb manage.py runserver
> /Users/kurtpeek/myproject/manage.py(2)<module>()
1 #!/usr/bin/env python
----> 2 import os
3 import sys
ipdb>
If I press c
to continue
, I just run into the error, with no possibility to drop into the debugger post-mortem. Presumably I could press n
(next
) until I get the error, but that would be quite cumbersome.
Is there a way to run python manage.py runserver
with post-mortem debugging?