delboy1978uk/twig-debug

A Twig Xdebug Breakpoint Extension

v2.0.0 2023-04-13 11:48 UTC

This package is auto-updated.

Last update: 2024-04-13 13:57:26 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License
Build Status Code Coverage Scrutinizer Code Quality
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() }}