Debugging Django Jinja templates

已回答

The documentation at https://www.jetbrains.com/help/pycharm/debugging-django-templates.html incorrectly suggests that Jinja templates cannot be debugged under PyCharm in a Django application. However, it turns out that setting breakpoints etc works just fine providing that the following TWO steps are taken:

1. Select Jinja as the option for "Python Template Languages"

2. In the "File Types" settings, associate Jinja with "*.html" if that is what is in use in addition to the default of "*.jinja2". A warning is reported about a clash with the HTML file type, but that can be ignored.

 

0

Hi Srhaque! Associating Jinja files with ".html" is a workaround, but not a correct solution for the problem. That's why documentation says we don't support it. You can follow this issue, if you want to get notification when the problem is fixed: https://youtrack.jetbrains.com/issue/PY-18248

0

Interesting, thanks.

0

请先登录再写评论。