O'Reilly logo

PHP 5 Power Programming by Derick Rethans, Stig Sæther Bakken, Andi Gutmans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14.6. Profiling with Xdebug

Xdebug is just like APD an extension that is used to collect data while executing a script, though the philosophy behind this extension is different. Where APD mainly focuses on profiling, Xdebug also focuses on debugging of scripts, including breakpoints and stepping through code. Profiling with Xdebug can be accomplished in two ways:

  • By tracing executed scripts to a file

  • By generating profiling data in the cachegrind format to a file

cachegrind is a profiler for programs written in C, and comes with a very nice front-end for KDE: KCachegrind.

14.6.1. Installing Xdebug

Just like APD, you can install Xdebug (http://xdebug.org) from PECL by running pear install xdebug. After installation, you must load Xdebug into Zend ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required