Unable to set breakpoints in .jinja2 template files

I have a Python project with some .jinja2 template files. In the settings, in Languages and Frameworks -> Template Languages, I have set the Template Language to "Jinja2" and I have also added "Jinja templates" to Template File Types.

The template code is neither formatted with the right color scheme set for the Jinja templates, nor I can set a breakpoint at a particular line by clicking the gutter at the line in the template files.

Could anyone please let me know if I am missing any other settings? Thanks in advance!

1

Hello,

Please try following this article, but using Jinja templates instead of HTML. 

0

It did not work. Even following the article.

0

I had the same issue and it was fixed by changing settings. Settings -> Template Languages -> Template Language set to Django (originally was Jinja2).

I set it to Jinja2. It worked for me. 

 

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003568440-One-Developer-Can-t-Set-Breakpoint-in-Django-Templates

Original discussion is above

0

请先登录再写评论。