Twig provides a dump
function for debugging variables in templates.
The dump
function outputs information about a template variable. The dump
function will not display anything unless twig_debug
is enabled.
To enable Twig debugging, find the twig.config parameters in your services.yml and set debug to true:
parameters:
twig.config:
debug: true