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 commentedI implemented this feature, but with a slightly different comment structure in order to make the difference between core and components debug comments clearer:
Comment #5
johnalbinThat will reduce the number of support requests in Drupal core's queue. Good thinking.
Comment #6
johnalbinNeeds some tweaking but the MR is fantastic! I wouldn't have known how to implement this feature otherwise.
Comment #7
johnalbinComment #9
johnalbin