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) -
cdinto untarred directory -
phpizeand 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
phpizenumbers match Zend extension when viewing eitherphpinfo()or viaphp -i -
Compile via
./configure --enable-xdebuga) You may need a C Compiler (e.g.yum install gcc) -
Create an
xdebug.inifile or add the following to yourphp.inifile (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 restartor similar. -
View
phpinfo()output to verify successful installation.