PhpStorm配置Xdebug调试

一、设置apache启用Xdebug

下载wamp Server,一般自带Xdebug;如果没有Xdebug可在https://xdebug.org下载,放到ext目录下,然后设置php.ini文件,在最后加上:

例:

[xdebug]
zend_extension ="d:/wamp64/bin/php/php5.6.16/ext/php_xdebug-2.4.0rc2-5.6-vc11-x86_64.dll"
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.remote_enable =1
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_mode = req
xdebug.remote_port = 9000
xdebug.idekey=phpStorm

然后重启apache。

二、设置PhpStorm

1、File->Settings->Languages & Frameworks->PHP

2、File->Settings->Languages & Frameworks->PHP->Servers

3、File->Settings->Languages & Frameworks->PHP->Debug
注意:Debug port要和php.ini设置的相同

4、File->Settings->Languages & Frameworks->PHP->Debug->DBGp Proxy
注意:IDE key要和php.ini设置的相同

5、进行Debug配置:

6、新建一PHP Web Application,内容如下:

7、点击右上角小电话,开启PHP Debug Connections

8、最后,开启Debug调试

效果如下:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值