首页 > 解决方案 > 将 NetBeans 连接到 Docker 容器上的 Xdebug

问题描述

我尝试将 NetBeans 连接到位于 Ubuntu 内的容器 PHP 中的 Xdebug。

问题是,如果我使用选项启动容器--net=host一切正常,但如果我尝试使用默认选项(网桥),NetBeans 可以访问容器,但容器无法访问我的主机环境。

这是我的 xdebug ini conf:

xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.profiler_enable=0
xdebug.remote_log="/tmp/xdebug.log"

请注意,Xdebug 日志明确报告 xdebug 找不到 getadress。

有没有办法将桥接容器连接到主机环境?

标签: dockernetbeansxdebug

解决方案


推荐阅读