docker php socket,Docker desktop与PHPSTORM整合

设置Docker Desktop

Settings -> General -> Expose daemon on tcp://localhost:2375 without TLS(勾选并重启)

设置xdebugxdebug.idekey=PHPSTORM

xdebug.remote_host=host.docker.internal

xdebug.remote_enable=on

xdebug.remote_port = 9001

xdebug.remote_handler = dbgp

xdebug.auto_trace = 1

xdebug.remote_log = /tmp/xdebug.log

设置PHP STORM

重启PHP STORM

设置

File -> Settings -> Build, Execution, Development -> Docker -> TCP Socket(没有的可以手动添加一个) -> Engine API URL(填写上tcp://localhost:2375)

CLI interpreter

File -> Settings -> Language & Framework -> PHP -> CLI interpreter(设置成对应的容器)

PHP Storm设置Debug端口

File -> Settings -> Languages & Frameworks -> PHP -> Debug -> Xdebug -> Xdebug Port(Debug的端口,设置为和xdebug.remote_port一样的值)

PHP Storm设置DBGp Proxy

File -> Settings -> Languages & Frameworks -> PHP -> Debug -> DBGp Proxy

IDE key : 服务器开启调试的Key,设置成和xdebug.idekey一样

Host : 服务器的IP,设置成127.0.0.1

Port : Debug的端口,设置为和xdebug.remote_port一样的值

PHP Storm设置Servers

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

Name : 随便填

Host : 填网站的域名

Port : 填网站的端口

Debugger : 选择Xdebug

配置项目Debug信息

Run/Debug Configurations

Server : 选择上一步添加的Server

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值