phpstorm+xdebug

[xdebug]

zend_extension=”C:\Apache\AppServ\php5.4.20\ext\php_xdebug-2.3.3-5.4-vc9.dll”

xdebug.default_enable=1

xdebug.auto_trace = 1

xdebug.show_exception_trace = 1

xdebug.collect_vars = 1

xdebug.collect_return = 1

xdebug.collect_params = 1

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_name = “cachegrind.out.%t-%s”

xdebug.remote_autostart = 1

xdebug.remote_enable = 1

xdebug.remote_handler = “dbgp”

xdebug.remote_host = “localhost”

xdebug.remote_port=9002

xdebug.idekey=”PHPSTORM”

xdebug在php.ini的配置,端口默认是9000,最好改成别的,我改的是9002,idekey需要自己设置下,一会phpstorm配置需要。

打开phpstorm,ctrl+alt+s打开设置,先修改php版本
这里写图片描述

Debug端口修改为9002
这里写图片描述

Servers添加:
name随便写
host:项目域名一般都是localhost
port :端口号
debugger:默认的Xdebug
这里写图片描述

修改DBGp Proxy
IDE key:填写上边配置的key,我这里是 PHPSTORM
host:localhost (本机ip)
port:9002 (xdebug配置端口)
这里写图片描述

点击这里,Edit Configurations
这里写图片描述

添加debug:
name随便写
server:选择刚才配置的server
Strat url:加载的文件路径
这里写图片描述

正常添加后灰色的绿箭头和虫子就能点了,然后打上断点,点虫子,应该就会自动打开浏览器加载项目路径了,回到ide就能看到debug信息了,如图
这里写图片描述

注:如果出现这个报错 Waiting for incoming connection with ide key ‘15930’
,应该是xdebug没有设置好。
引入dll 文件
正确的:zend_extension=”C:\Apache\AppServ\php5.4.20\ext\php_xdebug-2.3.3-5.4-vc9.dll”
错误的:extension=”C:\Apache\AppServ\php5.4.20\ext\php_xdebug-2.3.3-5.4-vc9.dll”,否则会

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值