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

        /* @var $block Mage_Core_Block_Abstract */
        $block = $observer->getData('block');

        // Last chance before rendering toolbar to fetch updates (queries triggered from blocks)
        if ($block->getNameInLayout() == 'debug_panels') {
            $this->updateProfiling();
        }

        if (!$this->canCaptureBlock($block)) {
            return;
        }

        $blockName = Mage::helper('sheep_debug')->getBlockName($block);

        $requestInfo = $this->getRequestInfo();

        try {
            $blockInfo = $requestInfo->getBlock($blockName);
        } catch (Exception $e) {
            // block was not found - lets add it now
            $blockInfo = $requestInfo->addBlock($block);
        }

        $blockInfo->startRendering($block);
    }
public function onBlockToHtml(Varien_Event_Observer $observer)
    {
        if (!$this->canCollect()) {
            return;
        }

        /* @var $block Mage_Core_Block_Abstract */
        $block = $observer->getData('block');

        // Last chance before rendering toolbar to fetch updates (queries triggered from blocks)
        if ($block->getNameInLayout() == 'debug_panels') {
            $this->updateProfiling();
        }

        if (!$this->canCaptureBlock($block)) {
            return;
        }

        $blockName = Mage::helper('sheep_debug')->getBlockName($block);

        $requestInfo = $this->getRequestInfo();

        try {
            $blockInfo = $requestInfo->getBlock($blockName);
        } catch (Exception $e) {
            // block was not found - lets add it now
            $blockInfo = $requestInfo->addBlock($block);
        }

        $blockInfo->startRendering($block);
    }
Listens to core_block_abstract_to_html_before event and records blocks that are about to be rendered.

@param Varien_Event_Observer $observer