Xdebug Docker跨集装箱通信设置

我遇到多个容器/跨容器Xdebug PhpStorm通信的问题。</ p>

我有一个包含10个容器的设置,这些容器彼此交谈,但似乎无法让Xdebug在所有容器上工作。</ p>

作为示例:
Container A发出请求 向容器B发出请求到容器C.
如何让断点停在容器B和C? </ p>

目前我没有超时,没有Xdebug他们会毫无问题地进行通信。</ p>

作为旁注,跨容器通信工作正常 相同的网络和Xdebug在每个容器上都可以独立工作。</ p>

这是我所有容器中的Xdebug配置:</ p>

  xdebug。  remote_port = 9006 
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_connect_back = 0
xdebug.remote_host = 10.254.254.254
xdebug.idekey = PHPSTORM
</ code> </ pre>
</ div >

展开原文

原文

I'm having an issue with multiple container / cross container Xdebug PhpStorm communication.

I have a setup with 10 containers who talk to one another but can't seem to get Xdebug working across all of them.

As an example: Container A makes a request to Container B which makes a request to Container C. How do I get breakpoints to stop at Container B and C ?

At the moment I get a timeout, without Xdebug they communicate without a problem.

As a side note Cross container communication is working they are in the same network and Xdebug works independently fine on each container.

This is the Xdebug config in all of my containers:

xdebug.remote_port=9006
xdebug.remote_autostart=1
xdebug.remote_enable=1  
xdebug.remote_connect_back=0 
xdebug.remote_host=10.254.254.254 
xdebug.idekey=PHPSTORM

1个回答



找到解决方案,</ p>

在进一步挖掘我发现的相关github问题之后 这个帖子:
https://github.com/docksal/docksal/issues/389</ a>
和这个stackoverflow问题:
Docker / Xdebug Over LAN Server Multiple Developers </ p>

这让我尝试了这个有效的配置:</ p>

现在所有容器中的最终配置都是:</ p>

  xdebug.remote_port = 9006 
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_connect_back = 0
xdebug.remote_host = 10.254.254.254
xdebug.idekey = PHPSTORM
< / code> </ pre>

基本上使用docker内部网络并使用远程连接解决它。 </ p>
</ div>

展开原文

原文

Found the solution,

after a bit further digging in kind of related github issues I found this thread: https://github.com/docksal/docksal/issues/389 and this stackoverflow question: Docker / Xdebug Over LAN Server Multiple Developers

Which led me to try this working configuration:

The final config in all of the containers is now:

xdebug.remote_port=9006
xdebug.remote_autostart=1
xdebug.remote_enable=1  
xdebug.remote_connect_back=0 
xdebug.remote_host=10.254.254.254 
xdebug.idekey=PHPSTORM

Basically using dockers internal network and using remote connect back solved it.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐