Basic overview of how to set up Xdebug on an nginx + fpm server (building from source)
-
Go to X-debug and download the appropriate version (wget works well) for your PHP version.
-
Untar (
tar vxfz FILENAME
) -
cd
into untarred directory -
phpize
and inspect versions. a) You may need to install php-devel package appropriate for your PHP build (e.g.yum install php-devel
) -
Make sure that
phpize
numbers match Zend extension when viewing eitherphpinfo()
or viaphp -i
-
Compile via
./configure --enable-xdebug
a) You may need a C Compiler (e.g.yum install gcc
) -
Create an
xdebug.ini
file or add the following to yourphp.ini
file (depending upon settings):
[xdebug]
zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_connect_back=1
xdebug.idekey=vagrant
-
Restart php-fpm
service php-fpm restart
or similar. -
View
phpinfo()
output to verify successful installation.