Skip to content

Instantly share code, notes, and snippets.

@zakiya
Created January 15, 2021 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zakiya/ded7a07d352dc86df38699b75af70199 to your computer and use it in GitHub Desktop.
Save zakiya/ded7a07d352dc86df38699b75af70199 to your computer and use it in GitHub Desktop.
Debugging Twig in Drupal
{# ~ Core ~ #}
{# {{ dump() }} #}
{# {{ dump(page) }} #}
{# ~ Devel~ #}
{# {{ kint()}} #}
{# {{ kint(page)}} #}
{# {{ devel_dump(page) }} #}
{# {{ devel_breakpoint() }} #}
{# ~ Devel + Kint library + settings change ~
{# https://site.lndo.site/admin/config/development/devel #}
{# https://gitlab.com/drupalspoons/devel/-/issues/358 #}
{# {{ kint(page)}} #}
{# ~ Twig Tweak ~#}
{# {{ drupal_dump(page) }}
{{ drupal_breakpoint() }}
{# ~ Twig Xdebug ~ #}
{# {{ breakpoint }} #}
{# ~ Other/ maybe? ~ #}
{# {{ dsm(kint(page)) }} #}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment