debug.rst 500B

123456789101112131415161718192021222324
  1. The Debug Extension
  2. ===================
  3. The ``debug`` extension provides a ``debug`` tag that can be used to
  4. output the content of the current context:
  5. .. code-block:: jinja
  6. {% debug %}
  7. This is really useful when a template does not work as expected. You can also
  8. output a specific variable or an expression:
  9. .. code-block:: jinja
  10. {% debug items %}
  11. {% debug post.body %}
  12. .. caution::
  13. The ``debug`` tag only works when the ``debug`` environment option is set
  14. to ``true``.