ifnull
7/8/2014 - 7:16 PM

Install xdebug and Webgrind for debugging Magento performance problems.

Install xdebug and Webgrind for debugging Magento performance problems.

Install xdebug and Webgrind

sudo su -
pecl install xdebug
apt-get install unzip
curl -o /tmp/webgrind-release-1.0.zip https://webgrind.googlecode.com/files/webgrind-release-1.0.zip
unzip /tmp/webgrind-release-1.0.zip -d /srv/app/store/
chown -R vagrant:vagrant /srv/app/store/
  • Unzipping to the Magento store directory because it is already setup to serve PHP.
  • DO NOT commit Webgrind

Enable xdebug in PHP

cat <<EOT >> /etc/php5/fpm/conf.d/xdebug.ini
zend_extension="/usr/lib/php5/20090626/xdebug.so"
zend_extension_ts="/usr/lib/php5/20090626/xdebug.so"
xdebug.profiler_enable = 1
EOT

Reload

service php5-fpm restart
service apache2 restart

Profit

http://127.0.0.1:8001/webgrind/