1、下载并添加chrome插件xdebug helper,下载地址:http://www.downcc.com/soft/261091.html
2、php添加xdebug扩展
mkdir -p /usr/local/xdebug
git clone git://github.com/xdebug/xdebug.git /usr/local/xdebug
cd /usr/local/xdebug
phpize
./configure --enable-xdebug --with-php-config=/usr/bin/php-config
make && make install
安装完成后在目录/usr/lib/php/20170718/下生成xdebug.so
修改php.ini
zend_extension=/usr/lib/php/20170718/xdebug.so xdebug.idekey=phpStorm xdebug.remote_enable = On xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.auto_trace = On
重启apache即可
3、修改phpStorm配置
点击file->setting进入设置项