debug twig file code example
Example 1: drupal 8 enable twig debug
// You enable Twig Debugging in services.yml
parameters:
twig.config:
debug: true
Example 2: dump all variables twig
{{ dump(user) }}
// You enable Twig Debugging in services.yml
parameters:
twig.config:
debug: true
{{ dump(user) }}