docker - 将 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。
有没有办法将桥接容器连接到主机环境?
解决方案
推荐阅读
- c++ - 为什么即使使用 const_cast 我也无法修改 const int 的内容
? - r - 如何做一个双循环+ else if?
- hibernate - 删除 OneToMany 关系中的实体,保留另一方实体 (JPA)
- java - PDFBox 为什么图像没有出现在 PDF 输出中?
- c - 而 (getchar != '\n'); 清除缓冲区的替代方法
- wordpress - 一个小时或更长时间后自动取消选中发布
- java - Java 流收集实体
- python - 尝试使用具有不唯一列的条件制作伪代码以应用于熊猫
- mysql - 在关闭 mysql 严格模式的情况下插入 mysql 问题
- python - 如何使用 OpenCV VideoWriter 将视频保存到特定目录——python