dev-master
9999999-devMagento module for convenient debugging and performance information
MIT
The Requires
by Grigory Kotov
debug cache block magento var_dump varien_profiler
Magento module for convenient debugging and performance information
If you tired use some combination like this, (*1)
var_dump($some); die();
And want some more comfortable, or you can`t use debugger, and still want to see some intermediate data when using Ajax, this for You., (*2)
In your code put some like this:, (*3)
Tommy_DebugInfo_Helper_Data::getMe()->addDebugOutput('Message section', 'My debug mess :)');
Then go to web browser and you`ll see there , (*4)
In this example I use this configuration for module: "Force Include output, if get this param" set to "?showInfog" in admin section, (*5)
$performance = Tommy_DebugInfo_Helper_Data::getMe(); $someArrayOrObject = new stdClass(); $someArrayOrObject->name='Home'; $someArrayOrObject->status=1; $performance->addDirectOutput($someArrayOrObject, 'someArrayOrObject');
You`ll see in Chrome console your object , (*6)
$performance->addPerformanceLog('sleep 5 sec'); sleep(5); $performance->addPerformanceLog('sleep 5 sec', 'finish');
You`ll see in browser your data If you want some intermediate data for your large process, (*7)
$performance->addPerformanceLog('sleep 5 sec'); sleep(3); $performance->addPerformanceLog('sleep 5 sec', 'breakpoint'); sleep(2); $performance->addPerformanceLog('sleep 5 sec', 'finish');
, (*8)
To check block caching is correct, you can use option in config part, (*9)
It works like described in screen outputs above. You see data in the bottom of browser page. This mode not recomended for production environment., (*10)
Like "Frontend" but use additional get parameter. Without this parameter we`ll get default behavior for pages., (*11)
In browser special page: http://url your.web.site/debug_info you`ll see list of connection (requests) to site. Browse to link you need then see all data like in "Frontend" mode. This mode require magento cache, there placed all data, you can clear magento cache this lead to clear debugInfo`s data Result is, (*12)
I like use the module with Cache Viewer , also I offer use development environment in Magento:, (*13)
server { # ..... server_name site.test www.site.test; root /var/www/site; location / { try_files $uri /index.php$is_args$args; } # ..... location ~ \.php$ { include fastcgi_common; fastcgi_param MAGE_IS_DEVELOPER_MODE 1; # enable dev mode } }
- nginx,, (*14)
<VirtualHost *:80> # ServerName site.test ServerAlias www.site.test SetEnv MAGE_IS_DEVELOPER_MODE 1 # enable dev mode #.......
- apache2; and in index.php type this, (*15)
//..... require_once $mageFilename; if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { Mage::setIsDeveloperMode(true); Varien_Profiler::enable(); // from profiler debugInfo get data ini_set('display_errors', 1); } //.....
Magento module for convenient debugging and performance information
MIT
debug cache block magento var_dump varien_profiler