phpstrom配置xdebug

1,xdebug

我是直接用的xampp,所以xdebug.dll是已经有了的。如果没有,或编译或下载去

2,php.ini

下载的xampp也已经有了如下代码,只需要取消注释即可。

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = On
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.idekey = PHPSTROM
xdebug.remote_port = 9000

如果没有以上配置,添加之,然后修改相应自己背地的路径。

**注意,xampp自带的配置中 xdebug.remote_enable 设置的是 0,需将其设置为1或On。(我就是在这里消耗了好多的脂肪)

3,phpstrom

a)File->Setting->Language & Frameworks->PHP->Servers 点击“+”号添加一个server,类似:


b)File->Setting->Language & Frameworks->PHP->Debug界面中,Debug port和php.ini文件中配置的xdebug.remote_port值一致

c)Run->Edit Configurations界面左上角中,点击“+”号,类似


d)File->Build,Executin,Deployment->Debugger的port不用管

4)chrome

谷歌扩展中搜索xdebug helper,找到xdebug helper。注意不是Xdebug这个扩展

添加完成后,点击xdebug helper插件的选项,在其设置页面中设置IDE key为PhpStrom(大小写无所谓)


如果不出意外,加上断点就可以调试了,如果出了问题,请不要找我。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值