mac 配置php,phpstorm的xdebug

1,下载安装php-xdebug

cd xdebug-2.5.1/

 phpize

./configure

make && make install

 

2,配置php.ini 文件

[xdebug]
zend_extension = /usr/local/Cellar/php@5.6/5.6.37/pecl/20131226/xdebug.so
xdebug.remote_enable = on
xdebug.remote_autostart = 1
xdebug.remote_handler = dbgp
xdebug.idekey = "PHPSTORM"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9001
xdebug.auto_trace=1

3,重启自己的php-fpm 如果brew安装的brew services start php5.6命令重启 或者 sudo killall php-fpm && sudo php-fpm

 

版本选择2.5.3成功

 

4,phpstorm配置

 

php.ini 中的配置xdebug.idekey,xdebug.remote_host,xdebug.remote_port

大功告成,教程比较简介,但是完成基本没啥问题,需要注意的地方都给大家标出来了,如果还是有不太明白童鞋可以留言给我

 

 

5:如果你想使用postman进行调试,也很简单添加如下headers:

Cookie:XDEBUG_SESSION=PHPSTORM

 

_SERVER["HTTP_COOKIE"]

pgv_pvi=184848384; XDEBUG_SESSION=PHPSTORM

xdebug.idekeyPHPSTORMPHPSTORM
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值