code/Debug/Model/Observer.php
public function onLayoutGenerate(Varien_Event_Observer $observer)
    {
        if (!$this->canCollect()) {
            return;
        }

        /** @var Mage_Core_Model_Layout $layout */
        $layout = $observer->getData('layout');
        $requestInfo = $this->getRequestInfo();

        // Adds block description for all blocks generated by layout
        $layoutBlocks = $layout->getAllBlocks();
        foreach ($layoutBlocks as $block) {
            if (!$this->canCaptureBlock($block)) {
                continue;
            }

            $requestInfo->addBlock($block);
        }

        // Update design information
        /** @var Mage_Core_Model_Design_Package $design */
        $design = Mage::getSingleton('core/design_package');
        $requestInfo->addLayout($layout, $design);

        // Save profiler information to get a generated token before rendering toolbar
        $this->saveProfiling();
    }
public function onLayoutGenerate(Varien_Event_Observer $observer)
    {
        if (!$this->canCollect()) {
            return;
        }

        /** @var Mage_Core_Model_Layout $layout */
        $layout = $observer->getData('layout');
        $requestInfo = $this->getRequestInfo();

        // Adds block description for all blocks generated by layout
        $layoutBlocks = $layout->getAllBlocks();
        foreach ($layoutBlocks as $block) {
            if (!$this->canCaptureBlock($block)) {
                continue;
            }

            $requestInfo->addBlock($block);
        }

        // Update design information
        /** @var Mage_Core_Model_Design_Package $design */
        $design = Mage::getSingleton('core/design_package');
        $requestInfo->addLayout($layout, $design);

        // Save profiler information to get a generated token before rendering toolbar
        $this->saveProfiling();
    }
Listens to controller_action_layout_generate_blocks_after and records
instantiated blocks

@param Varien_Event_Observer $observer