Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When Drupal's Twig debugging feature is turned on, the Components module should output debugging comments too.
The debugging comments should list:
- The namespace-based reference to the template, e.g.
@namespace/path/template.twig
- The file path to the template, relative to the Drupal root.
<!-- THEME DEBUG -->
<!-- TWIG TEMPLATE: '@namespace/path/template.twig' -->
<!-- BEGIN OUTPUT from 'themes/custom/example/namespace/path/template.twig' -->
[ template contents ]
<!-- END OUTPUT from 'themes/custom/example/namespace/path/template.twig' -->
Issue fork components-3216184
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
DieterHolvoet CreditAttribution: DieterHolvoet at Minsky commentedI implemented this feature, but with a slightly different comment structure in order to make the difference between core and components debug comments clearer: