Introduction
Imagine you should fix something in Magento 2 on the product listing page, for example.
You added an data (like new block with arguments, for example) to the catalog_category_view.xml
layout but your changes doesn’t respond on front-end.
Solution
To check if your data exists in the catalog_category_view.xml
layout you should print all layout on the product listing page.
- Navigate to the following class and method:
\Magento\Framework\View\Layout\Builder::generateLayoutXml
- After this line
$this->layout->generateXml();
add the following
var_dump($this->layout->getXmlString());
exit;
- Re-fresh the cache and reload product listing page.
And you will see the layouts which Magento 2 comabined before render front-end.