7 * Alternate Installation
12 This module enables you to use Xdebug breakpoints with Twig templates.
14 To use it, insert {{ breakpoint() }} into your template. When the processor
15 reaches that point, it makes a call to a Twig extension where xdebug_break() is
18 The breakpoint will open in a file (BreakpointExtension.php) outside your Twig
19 template, but you'll be able to inspect any variables available at the
20 breakpoint in the template. The key values you'll see at the breakpoint are:
22 - $context These are the variables available to use in the template.
23 - $environment This is information about the Twig environment, including
25 - $arguments If you supply an argument to breakpoint (e.g
26 {{ breakpoint(fields) }}), it'll be viewable here.
31 This module requires the Composer package ajgl/breakpoint-twig-extension:
33 https://packagist.org/packages/ajgl/breakpoint-twig-extension
38 On Drupal 8.1.x, install the module using CLI:
40 1. Add the Drupal Packagist repository (if you haven't already):
42 $ composer config repositories.drupal composer https://packages.drupal.org/8
44 2. Require and install the module and its dependencies:
46 $ composer require drupal/twig_xdebug
48 ALTERNATE INSTALLATION
49 ----------------------
51 On Drupal 8.1.x, install the module manually:
53 1. Add the git repository to your composer.json:
56 ... other repos (if any) ...
59 "url": "https://packages.drupal.org/8"
63 2. Require the module in your composer.json:
66 ... other packages ...
67 "drupal/twig_xdebug": "8.*"
70 3. Install the module and its dependencies:
72 $ composer update drupal/twig_xdebug
75 On Drupal 8.0.x, install the module using composer_manager:
77 1. Download twig_xdebug
79 $ drush dl twig_xdebug
81 2. Download composer_manager
83 $ drush dl composer_manager
85 Note: You don't have to enable composer_manager to use it.
87 3. Run the composer_manager init script
89 $ php modules/contrib/composer_manager/scripts/init.php
91 4. Rebuild your composer.json file
93 $ composer drupal-rebuild
95 5. Update to install dependencies
97 $ composer update drupal/twig_xdebug
99 Learn more about using composer_manager here:
101 https://www.drupal.org/node/2405811