首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >xdebug phpstorm docker linux

xdebug phpstorm docker linux
EN

Stack Overflow用户
提问于 2020-02-14 21:41:39
回答 2查看 107关注 0票数 0

我无法通过xdebug捕获对我的应用程序的任何请求。

xdebug.ini

代码语言:javascript
复制
zend_extension=xdebug.so
xdebug.remote_autostart = 1
xdebug.idekey=PHPSTORM
xdebug.remote_connect_back=1
xdebug.remote_enable=On

EN

回答 2

Stack Overflow用户

发布于 2020-02-18 18:09:19

我看到你给这个贴上了"docker“的标签。如果你使用docker,你不能使用xdebug.remote_connect_back=1。您需要指定xdebug.remote_host=IP-address-of-the-machine-as-reachable-by-docker-where-your-IDE-runs。在较新的版本中可以是host.docker.internal

为了进一步调试网络问题,还请在您的php.ini设置中设置xdebug.remote_log=/tmp/xdebug.log,并查看当您启动调试会话(通过浏览器扩展)时它显示了什么。

票数 2
EN

Stack Overflow用户

发布于 2020-02-21 22:16:59

由具有以下xdebug.ini配置的sudo iptables -A INPUT -p tcp --dport 9000 -j ACCEPT修复

代码语言:javascript
复制
xdebug.remote_autostart = 1
xdebug.idekey=PHPSTORM
xdebug.remote_connect_back=0
#172.17.0.1 is docker0 interface ip address (see ifconfig)
xdebug.remote_host=172.17.0.1
xdebug.remote_enable=On
xdebug.remote_port=9000
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60227506

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档