How to enable Twig templates Debug ? Debugging Twig templates.
Like drush vset theme_debug 1 On drupal 7 ?
Enable debugging
You enable Twig Debugging in sites/default/services.yml.
(If services.yml does not yet exist; copy default.services.yml and rename it to services.yml.)
parameters:
twig.config:
debug: true
Printing variables
{{ dump() }}
{{ dump(var) }}
Or If you have Devel's kint:
{{ kint() }}
Via Drush (On drupal 7, Not for D8)
drush vset theme_debug 1
Configuration override For theming and Integration.
To optimize performence, drupal compress and aggregate CSS / JS files. But for front side development we need to disable this function. You can do that from /admin/config/development/performance , and also via setting.php.
Comments