调试Magento中的实例化类

In PHP there get_object_vars, get_class and methods that return information about the class, we can use the Magento Zend_Debug::dump(), Mage::log() and up XDebug, but during module development in Magento, where we need overwrite some part of the administrative panel, for that we must look for the correct classes.

How to get list of all instantiated classes accessing a page of Magento?

Example: X user accessed Catalog->Attributes->Manage Attribute, how to generate a Debug with the list of all classes that were instantiated when the user accessed the Manage Attribute?

The "cheap" way of doing this would be to add a

<!-- 
<?php print_r( get_included_files() ); ?>
-->

to the end of index.php. This would print out every file included by Magento for a particular request, and since Magento's files are named consistently you could derive the class names.

If you're interested in spending a little money, I develop and sell a commercial debugging extension for Magento called Commerce Bug. This extension outputs a ton of useful debugging information for each page request. The demo page can give you a feel for how it works (as well as reveal information for Magento's stock theme).