Magento 的调试套件
This extension provides some debbuging functionality for Magento.
This extension provides some debugging functionality for Magento. This includes:
Install the files using one of the following methods:
modman clone https://github.com/firegento/firegento-debug.git{
...
"require": {
"firegento/debug":"*"
},
"repositories": [
{
"type": "composer",
"url": "http://packages.firegento.com"
}
],
"extra":{
"magento-root-dir": "./"
}
}
php composer.phar install or composer installYou can copy the files from the 'src' folder of this repository to the same folders of your installation
Once the files are installed:
A new Menu item named "FIREGENTO" will appear in the admin area
This module exposes some logging functionality for use in your own extensions.
You can:
The extension can be configured under FIREGENTO > Configuration
Here you can change the name of the log file which will be written (by default firegento.log) if you select "Force Logging" then the log file will be written to irrespective of the the configuration setting to enable logging "Developer > Log Settings > Enabled".
$product = Mage::getModel('catalog/product');
Mage::helper('firegento/log')->log($product->debug());This statement will take the output of $product->debug() and log it to the configured file.
There is also a utilty method available debug() you can use this method to log large objects such as sales/quote, sales/order or other objects which are instances of Varien_Object internally the debug() method of this object will be called, and the output logged to using FireGento_Debug_Helper_Log::log()
$object = Mage::getModel('sales/order')->load(XXX);
Mage::helper('firegento/log')->debug($object);It is also possible to send the output of the logging to the browser and have it displayed by ChromePhp, FirePHP or Firelogger in order to do this, you must make sure that you have enabled the appropriate option in the configuration, and then you can simply use one of the following statements:
$product = Mage::getModel('catalog/product');
// log to chromephp
Mage::helper('firegento/log')->chromephp($product->debug());
// log to firelogger
Mage::helper('firegento/log')->firelogger($product->debug());
// log to firephp
Mage::helper('firegento/log')->firephp($product->debug());You will then see something like these images in the browser extensions:
The functionality can be accessed via the "FIREGENTO" menu item.
Here all the installed modules including their dependencies are listed.
You will see:
Non system extensions can be activated/decativated by clicking on the link in the Action column.
A convenient overview of rewritten classes is displayed here. When a classpath is overwritten by an extension, you will see the name of the class which overrides it, and the name of the active class for that classpath. In the case of a rewrite conflict the status column displays a red "not ok" status. You will see that the Active class differs from the rewrite class.
In the image above the classpath core/email_template is succesfully overwritten.
Here there is a rewrite conflict, and the rewrite which is not active is shown with a red "not ok" status
there is a file called firegento.php which you can install in the root of your magento instance, this allows you to check the status of rewrites without installing the whole Firegento_Debug extension.
This allows you to see all events in your system and which observers are listening for them. When more than one observer is bound to the event, then they are listed under each other, in the column "Location"
Here you will see information about the system, which is divided into 5 areas:
The output of the phpinfo() function is displayed here
The log viewer allows you to select a log file to open, you will be able to see in real time in a console like window as entries are written.
If you have any issues with this extension, open an issue on GitHub.
Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.
Thanks goes to these wonderful people (emoji key):
Rouven Alexander Rieker
Tobias Vogt
Andre Flitsch
Vincent Pietri
Achim Rosenhagen
Vinai Kopp
Jörg Weller
Kevin Krieger
This project follows the all-contributors specification. Contributions of any kind welcome!
GNU General Public License, version 3 (GPLv3)
(c) 2013 - 2020 FireGento
暂无开放 Issues,或尚未同步最近议题。