Profiling PHP – xdebug Installation and Configuration

The first tool we will install and configure is xdebug, a debugging and profiling tool for PHP. This extension can be downloaded, decompressed, configured, compiled and installed in a very easy manner by using the PECL utility included with PHP (https://pecl.php.net/). To do this, inside the container's Terminal window, please enter the following commands:

# pecl install xdebug # echo -e "zend_extension=$( php -i | grep extensions | awk '{print $3}' )/xdebug.so\n" >> /etc/php.ini # echo -e "xdebug.remote_enable = 1\n" >> /etc/php.ini # echo -e "xdebug.remote_enable_trigger = 1\n" >> /etc/php.ini # echo -e "xdebug.remote_connect_back = 1\n" >> /etc/php.ini # echo -e "xdebug.idekey = PHPSTORM\n" ...

Get Mastering The Faster Web with PHP, MySQL, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.