I have configured Xdebug inside PHP container which is run by Docker inside Vagrant.
What's the best way to get Xdebug working in PhpStorm, so how to expose docker container debugger info (port 9003) to establish connection with PhpStorm on enabled PHP Debug Connections listener. Since there are 2 communication layers (PC->Vagrant->Docker)
CodePudding user response:
"to expose docker container debugger info (port 9003) to establish connection with PhpStorm"
That is the wrong assumption. Xdebug needs to make a connection to your IDE, not the other way around.
So you need to tell Xdebug to connect to the IP address that your IDE runs at, which you can possibly find by running "ifconfig" on the host, and there are likely multiple options.
I do not understand why you run Docker in Vagrant though.