http://xdebug.org/install.php#configure-php A list of all settings: http://xdebug.org/docs-settings.php A list of all functions: http://xdebug.org/docs-functions.php Profiling instructions: http://xdebug.org/docs-profiling2.php Remote debugging: http://xdebug.org/docs-debugger.php
下载 xdebug 最新的源码包
wget https://xdebug.org/files/xdebug-2.6.0.tgz
解压缩
tar -zxvf xdebug-2.6.0.tgz
编译安装
cd xdebug-2.6.0 phpize ./configure --enable-xdebug make
make install
[xdebug] zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so" xdebug.remote_enable=1 xdebug.remote_handler=dbgp #xdebug.remote_mode=req xdebug.remote_host=127.0.0.1 xdebug.remote_port=9001 xdebug.idekey=www #idekey=PHPSTORM ;注意这个autostart很关键,我就是加了这个才跑起来的 xdebug.remote_autostart=1 xdebug.remote_log=/var/xdebug.log
cd /etc/php/7.2/fpm/conf.d/ sudo ln -s /etc/php/7.2/mods-available/xdebug.ini 20-xdebug.ini cd /etc/php/7.2/cli/conf.d/ sudo ln -s /etc/php/7.2/mods-available/xdebug.ini 20-xdebug.ini
原文:https://www.cnblogs.com/jiangfeilong/p/11163117.html