Can't debug Django templates - PyCharm ignores breakpoints

I am trying to debug some third party django templates using PyCharm. I wasn't able to set breakpoints in the templates, until I added the location of the third party templates to my PYTHONPATH and Project Structure. Now I can set breakpoints, which the PyCharm debugger ignores.

So I tried overriding the third party templates with copies in my app's templates directory. Django-debug-toolbar confirms that these are now the templates being used. It doesn't help - any and all breakpoints I set in them are still completely ignored by the debugger.

PyCharm 2023.3.2 (Professional Edition)

Python 3.12

Django tried with 4.2 and 5.0.1


Tried with the same software setup on a different machine, and breakpoints in overridden copies of the third party templates inside my project directory structure work just fine. Don't know what the difference in environment/setup between the two machines is.



i am having a similar issue.

I use docker with the remote interpreter. my current python version in some projects is 3.12.2. in projects that use this version i am able to debug and set breakpoints in *.py as expected but the django *.html template files no breakpoints are hit.

this is both in packages and my own template files.

Downgrading the python version to 3.11.6 works as expected with no additional project configuration changes.