1.下载xdebug包(该下载什么版本自己去找),给个链接
2. tar -zxvf xdebug...
3. cd xdebug
4. 生成configure
5. 安装
./configure --with-php-config=/usr/local/php/bin/php-config
6. make && make install
7.配置 php.ini
[xdebug]
1917 zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so" #源码编译的具体位置
1918 xdebug.remote_enable=1 #开启
1919 xdebug.remote_handler=dbgp
1920 xdebug.remote_mode=req
1921 xdebug.remote_host=localhost #本地地址
1922 xdebug.remote_port=9001 #这里一定不要写9000, 因为nginx就是9000, 不然打不开php文件
1923 xdebug.idekey=PHPSTORM #这里对应后面的phpstorm
8.重启 service nginx restart
service php-fpm restart
9.下载xdebug-helper (上面贴的那个地址有告诉,实在不能fq, 自己百度离线下载)
10. 配置phpstom
(端口一直)
重点来了()
11.根据mca 访问, 就可以得到你想要的debug