1 linux安裝xdebug
pecl install xdebug
zend_extension="/usr/local/php/modules/xdebug.so"
然後php -m 看是否有沒安裝成功
2 在php.ini中增加
xdebug.idekey=PHPSTORM
xdebug.remote_enable=1
xdebug.remote_host=192.168.10.195 //phpstorm的ip地址
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir="/data/log/Xdebug"
3 先設置php的cli運行路徑
設置xdebug的監聽端口,並啓動xdebug
設置server的相關信息
配置php web application的信息
然後每次debug都要更換下web application 的地址
然後就可以進行xdebug調試了。
作者: lifeng_881888
鏈接:http://www.imooc.com/article/21222
來源:慕課網