Please do not use this trick in Live/Production
1)
---------inspect file path--------------------
Enable block comments
/home/jigar_karangiya/htdocs/learnmagento/vendor/magento/framework/View/Layout.php
method : renderNonCachedElement
535 : comment ($result = $this->_renderContainer($name, false)😉
add : code
code :
//$result = $this->renderContainer($name, false);
$result = "<!-- >> START Container : " . $name . " << -->" . $this->renderContainer($name) . "<!-- >> END Container : " . $name . " << -->";
Step 2 :
/home/jigar_karangiya/htdocs/learnmagento/vendor/magento/framework/View/Element/Template.php
mathod : _toHtml (295)
code:
$name = $this->getNameInLayout();
$template = $this->getTemplateFile();
$class = get_class($this);
if (!$this->getTemplate()) {
return '';
}
return "<!-- BEGIN ($name) Block-($class) -->\n". $this->fetchView($template) . "<!-- END ($name) Template-($template) -->";
//return $this->fetchView($this->getTemplateFile());