phpStorm + xDebug + Docker not working in Windows 10


I will start saying that I have tried everything on my own post and nothing there help me out. Here is the list of the software (and it's version) I am using:

  • Docker version 18.03.0-ce-rc1, build c160c73
  • docker-compose version 1.19.0, build 9e633ef3
  • Windows 10
  • Eset Internet Security
  • phpStorm 2018.1 EAP Build #PS-181.4096.20
  • PHP 5.3.3
  • xDebug 2.2.7

For the following test I have completely disabled the AV firewall so nothing gets blocked. Here is the configuration I have in phpStorm:

PHP Settings:

CLI Interpreters:



As for me everything is fine and should work but sadly it's not and I am not able to find out where the problem is. Last but not least this is how xDebug has been configured:

xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.idekey = "PHPSTORM"
xdebug.remote_autostart = 1
xdebug.remote_log = /var/log/xdebug.log
xdebug.remote_host =

And I am able to see that configuration loaded properly. The debugger is enabled in both sides, the IDE and the browser (Chrome with xDebug Helper). Finally here is the repo with the Docker if you want to give it a try.

And here is the docker-compose.yml I am using for build the image and test:

version: '3.4'
context: .
- "80:80"
- F:/Development/applications/testroot/:/var/www/html
restart: on-failure
VHOST_DOCUMENT_ROOT: /var/www/html

The only file under /var/www/html would be index.php with the following code:


$var = 3;
$var = $var + 1;

echo $_SERVER['REMOTE_ADDR']; // I've a breakpoint here just for fun


Can any give this a try or tell me what I am missing?


Please remove remote_connect_back, I am not sure about the priority but it may interfere with remote_host.

Then, we need to find out if is an IP the container may use to initiate a TCP connection to the host.
To be honest, I think it's not, and the correct address is (an address of DockerNAT interface, you can check that with ipconfig).

Also, please check what the Xdebug log says, it's very helpful in such cases.


Hi there @Eugene, thanks it's working now by removing as you said the remote_connect_back and then writing the right IP address. After change this and try everything was working fine from Xdebug + phpStorm side but the firewall was blocking the incoming connection so unblocking it make it to work.

Thanks this was driving me crazy


Please sign in to leave a comment.