1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > dbgpProxy php 远程xdebug调试

dbgpProxy php 远程xdebug调试

时间:2022-05-18 17:04:13

相关推荐

dbgpProxy php 远程xdebug调试

文章目录

远程xdebug调试dbgpProxy, php-fpm, 编辑器三者通信示意图dbgpProxy下载:dbgpProxy-启动phpStorm注册dbgpProxy设置bdgpProxy IP 端口和 ide key注册DBGp ProxyphpStorm 启动xdebug监听url 增加XDEBUG_SESSION_START=ide key总结下载地址

远程xdebug调试

xdebug调试开发环境,测试环境等非本地环境代码

需要把dbgp Proxy启动在可以被开发环境或测试环境链接通的机器,我就直接在测试环境启动dbgpProxy服务。

dbgpProxy, php-fpm, 编辑器三者通信示意图

dbgpProxy下载:

/download#dbgpProxy

dbgpProxy-启动

-i 指定IDE注册端口

-s 指定php-fpm链接端口

./dbgpProxy-macos -hXdebug DBGp proxy (0.3)Copyright by Derick Rethans11:16:11.472 [warn] [SSL] The 'certs/fullchain.pem' file could not be found, not enabling SSL listenersUsage: dbgpProxy-macos [-hv] [-i host:port] [-s host:port] [parameters ...]-h Show this help-i, --client=host:portSpecify the host:port to listen on for IDE (client)connections [localhost:9001]-s, --server=host:portSpecify the host:port to listen on for debugger engine(server) connections [localhost:9000]-v Show version number and exit

启动./dbgpProxy-macos -i :9001 -s 127.0.0.1:9022

phpStorm注册dbgpProxy

设置bdgpProxy IP 端口和 ide key

tools -> DBGp Proxy -> Configuration

ip: 上一步启动dbgpProxy的机器IP

port: 上一步 -i 参数指定的端口号

IDE key: 个人名称,区别与他人, 每人维一。

注册DBGp Proxy

tools -> DBGp Proxy -> Register IDE

看右下角提示,成功。

phpStorm 启动xdebug监听

Run -> Start Listening For PHP Debug Connections

url 增加XDEBUG_SESSION_START=ide key

如:

/index-api/v1/test?XDEBUG_SESSION_START=owen

总结

php.ini 配置原程IP和port为 dbgpProxy监听的端口

phpStorm 要注册到dbgpProxy

phpStorm 启动监听PHP debug

url 增加XDEBUG_SESSION_START 参数

下载地址

/download#dbgpProxy

/komodo/remotedebugging/

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。