delboy1978uk / twig-debug
A Twig Xdebug Breakpoint Extension
v2.0.0
2023-04-13 11:48 UTC
Requires
- twig/twig: *
Requires (Dev)
This package is auto-updated.
Last update: 2026-03-13 17:50:42 UTC
README
Use XDebug to pause your code inside a Twig view.
installation
composer require delboy1978uk/twig-debug
configuration
Register the extension with Twig:
<?php
use Del\Twig\DebugExtension;
/** @var $twig Twig_Environment */
$twig->addExtension(new DebugExtension());
Or, if you are using Symfony, add it to your services.yml like this:
Del\Twig\DebugExtension:
tags:
- { name: twig.extension }
usage
Within a Twig block, simply add:
{{ breakpoint() }}