I found a lot of info about how to debug simple Python programs with Emacs. But what if I want to debug a Django application? I run the development server and I would like to so
Because recent versions of Emacs python mode do support 'pdbtrack' functionality by default, all you need is just set up breakpoint in your code this way:
import pdb; pdb.set_trace()
Also, you have to start your Django application devserver from within Emacs shell:
M-x shell
And then, in the shell, start the Django development server:
python ./manage.py runserver
P.S. No need for specific pdb sessions or --noreload flag. Noreload would require you to manually restart your applications and so I do not find this useful for Emacs.