Magento Debugging

11

Click here to load reader

description

Slides used during Magento User Group Den Bosch, dealing with Magento debugging - tools, extensions and tips on how to troubleshoot Magento errors and performance.

Transcript of Magento Debugging

Page 1: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Magento debugging

Page 2: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Basics

System > Configuration > DeveloperLogging

Template Path Hints

MAGENTO_ROOT/var/logsystem.log

exception.log

MAGENTO_ROOT/var/reportException handling > Graylog2, Loggly

Page 3: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Blank page

A blanc page tells you nothing500 Internal Server Error = “look internally for the actual error”

Webserver (Apache, Nginx) error_log

Or enable PHP “display_errors”

Page 4: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Magento extensions

Aoe_Profiler

Commerce Bug (astorm)

Mgt_Developertoolbar

Magento Debug (github.com/jreinke)

Magneto Debug

Yireo_ProfilerLog

Yireo_NewRelic

Page 5: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Magento command-line tools

n98-magerun (+ composer)

modman

Page 6: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Linux tools

git, vim, locate, lockrun

top, ps, free, netstat, vmstat, tcpdump, uptime, nice

lsof, iostat, htop, atop, pidstat

Percona Toolkit

Page 7: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

PHP environment

PHP settingslog_errors, display_errors, error_reporting

PHP modulesxdebug

Page 8: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Magento programming

Mage::setIsDeveloperMode(true);

Zend_Debug::dump($variable);

Mage::log(var_export($entity->debug(), true)));

$model->getData();

Mage::app()->getConfig()->getNode()->asXML()

Page 9: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

New Relic

SubscriptionsNew Relic Free

New Relic Pro > application tracing (14 day trial)

MonitoringApplication (PHP, webserver, MySQL)

Server

MagentoYireo_NewRelic extension

Page 10: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

Zend Server

Z-RayDeep code inspection

php_prepend_file

Page 11: Magento Debugging

Presentation “Magento Debugging” - http://slideshare.net/yireoJisse Reitsma ([email protected]) - Twitter @yireo

tweet @yireo