delboy1978uk / twig-debug
A Twig Xdebug Breakpoint Extension
Installs: 5 230
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- twig/twig: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-13 15:06:50 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() }}