Skip to content

Missing Info on configuration for debugging a twig template #455

Closed
@keymaster

Description

@keymaster

Should mention somewhere:

To debug a twig template, put the following in app/config/config_dev.yml:

services:
twig.extension.debug:
class: Twig_Extensions_Extension_Debug
tags: [ { name: 'twig.extension' } ]

Then, from within the twig template, do:

{% debug varname %}

Be warned that doing {% debug %} by itself can create so much debug info that you will time out. Either increase your timeout or be more specific in what you would like to debug.

Also, note the the WDT displays info about what variables are passed to your template, and their values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions