Inspect Variables Available in a Template for Drupal 8, Drupal 9

Last updated July 11, 2017
Theming8.9.x/9.0.x

Knowing how to inspect the variables available within a template file enables you to discover all of the dynamic content in a Twig file, not just that which is already being used.

In this tutorial, we'll learn how to use {{ dump() }}, kint(), vardumper(), and XDebug to inspect variables in a template file.