美文网首页
【踩坑】phpstorm+postman+xdebug3 配置

【踩坑】phpstorm+postman+xdebug3 配置

作者: 不留余白 | 来源:发表于2021-03-17 18:28 被阅读0次

xdebug

配置完xdebug死活进不去断点,php --ini 发现有报错信息

Xdebug: [Config] The setting 'xdebug.auto_trace' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.auto_trace (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.collect_params' has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.collect_params (See: https://xdebug.org/docs/errors#CFG-C-REMOVED)
Xdebug: [Config] The setting 'xdebug.collect_vars' has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.collect_vars (See: https://xdebug.org/docs/errors#CFG-C-REMOVED)
Xdebug: [Config] The setting 'xdebug.profiler_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.profiler_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.profiler_enable_trigger' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.profiler_enable_trigger (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_autostart' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_autostart (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_connect_back' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_connect_back (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_host' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_log' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_log (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_port' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)

看来是我从网上找的配置是xdebug2的,在3里已经不叫这个名字了,修改配置

xdebug.mode = debug //开启debug
xdebug.client_host = "127.0.0.1"
xdebug.client_port = 9001
xdebug.collect_return=On ;收集返回值
xdebug.idekey="PHPSTORM"
xdebug.log="/tmp/xdebug.log"

世界又美好了...

phpstorm

再看看phpstorm里的配置
(1)在文件->设置->语言与框架中->PHP->debug 设置端口,端口默认为9000,由于经常会被其他程序占用,这里建议设置为9001


修改调试端口

(2)在DBGp Proxy中配置你的idekey,idekey就是你在配置文件中最后一项,host是你的服务器ip或者是已经可以解析的域名,port可以自选,一般默认选80就好了

修改调试协议DBGp的配置

(3)自己手动添加一个,Host填服务器ip,然后port是默认80端口,如果你修改过,你可以更改成你设置的web端口,debug选xdebug


创建一个本地调试服务器

postman

添加cookie XDEBUG_SESSION=PHPSTORM;

配置cookie 打开debug监听

相关文章

网友评论

      本文标题:【踩坑】phpstorm+postman+xdebug3 配置

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