Yireo_HtmlHints

PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Latest Release 1.0.0

Magento version PHP version License Latest Version

A simple Magento 2 module that - once enabled - adds HTML hints to the frontend This module adds HTML hints (HTML comments <!-- -->) to the HTML output of a page, adding details on the rendered block or container.

Note that this module creates a preference rewrite of the core interface Magento\Framework\View\LayoutInterface which might conflict with other modules.

Installation

composer require yireo/magento2-html-hints
bin/magento module:enable Yireo_HtmlHints

Usage

Before:

<div class="page-title-wrapper">
    <h1 class="page-title" id="page-title-heading" aria-labelledby="page-title-heading toolbar-amount">
        <span class="base" data-ui-id="page-title-wrapper">Example</span>    
    </h1>
</div>

After:

<!-- BLOCK CLASS: Magento\Theme\Block\Html\Title\Interceptor / BLOCK NAME: page.main.title / TEMPLATE NAME: Magento_Theme::html/title.phtml / TEMPLATE FILE: /var/www/html/vendor/magento/module-theme/view/frontend/templates/html/title.phtml -->
<div class="page-title-wrapper">
    <h1 class="page-title" id="page-title-heading" aria-labelledby="page-title-heading toolbar-amount">
        <span class="base" data-ui-id="page-title-wrapper">Example</span>
    </h1>
</div>
<!-- END BLOCK page.main.title -->

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

Support

For getting support, create an Issue under the following project URL:

https://github.com/yireo/Yireo_HtmlHints

Composer details
Magento module name
Yireo_HtmlHints
Composer name
yireo/magento2-html-hints
Composer version
No release yet
Default branch
master
Requirements
magento/framework: ^101.0 | ^102.0 | ^103.0
php: >=8.2 <8.6
Releases
1.0.0 23 October 2026
Changelog

[1.0.0] - 06 January 2026

Initial release

  • Add rendering time to block hints
  • Also add observer to add hints to much more blocks
  • Only enable in Developer Mode
  • Initial concept

Last modified: October 17, 2026