It has been difficult for themers to determine which theme function or template produced the markup they wish to modify, and usually involves searching the Drupal codebase for instances of classes or other such identifiers found in the resulting markup.
Output the full path and name of the template file used for each block of markup in HTML comment tags before and after the markup when Debug mode is enabled (Need reference to Twig/theme debug mode, and how to enable it):
<!-- START /sites/all/themes/mytheme/templates/node/node--1.html.twig -->
<!-- END /sites/all/themes/mytheme/templates/node/node--1.html.twig -->
- Have Twig theme engine produce these comments without the need to change any .html.twig template files.
User interface changes
None visible in output, only HTML comments in markup.
Original idea by Fabianx
See Fabian's comment (#25) in