美文网首页程序员PHP经验分享
phpStrome 设置调试工具XDebug 配置使用

phpStrome 设置调试工具XDebug 配置使用

作者: Gundy_ | 来源:发表于2017-06-08 10:14 被阅读135次

安装xdebug扩展

  • 安装步骤执行查询
  • 修改xdebug配置
;是否开启远程调试自动启动
xdebug.remote_autostart = On

;是否开启远程调试
xdebug.remote_enable = On

;允许调试的客户端IP
xdebug.remote_host=localhost

;远程调试的端口(默认9000)
xdebug.remote_port=9000

;调试插件dbgp
xdebug.remote_handler=dbgp

;是否收集变量
xdebug.collect_vars = On

;是否收集返回值
xdebug.collect_return = On

;是否收集参数
xdebug.collect_params = On

;是否开启调试内容
xdebug.profiler_enable=On

xdebug.idekey = PHPSTORM

  • 重启fpm

配置phpstorm

  • 配置PHP版本


  • 设置phpstorm监听xdebug的端口号,默认为9000(跟xdebug一致)



  • 配置web server,填写你要xdebug的服务相关信息


浏览器插件 xdebug helper, 下载好之后点选项, IDE选PHPSTORM

PHPSTORM 点菜单栏的Run>Edit Configurations… 在弹出的窗口中添加一个调试配置

然后就可以在IDE里面打断点进行断点调试了


相关文章

网友评论

    本文标题:phpStrome 设置调试工具XDebug 配置使用

    本文链接:https://www.haomeiwen.com/subject/idpzfxtx.html