-
Place breakpoints in the desired lines of the Django templates:

Note that Django should be specified as the project template language.
- Launch Django server in the Debug mode. To do that, select run/debug configuration
Django Server, and press Shift+F9.
PyCharm will open the template in your browser, and suspend at the breakpoint you've set:

The Debugger session starts, and Debug tool window appears.
- In the Debug tool window, you can:
- Examine the rendering contexts in the Variables pane:

- Step through the breakpoints defined within the Django template.
- Use the debugging console.
- Examine the rendering contexts in the Variables pane:
- If you want to trace back exceptions that are raised in course of template debugging, open Breakpoints dialog, and in the Django Exception Breakpoints tab, select the check box Suspend.
- Debugging Jinja and Mako templates is not supported.
