title: How to setup xdebug and PhpStorm with docker for Windows (beta)
body: <p>I'm a bit confused using Xdebug, Docker for Windows, and PhpStorm...</p>
  
  <p>I have Xdebug configured in a container with PHP. Here is what appears in my php.ini from within this container :</p>
  
  <pre><code>xdebug.remote_enable=on
  xdebug.remote_autostart=off
  xdebug.idekey=PHPSTORM
  xdebug.remote_port=9000
  xdebug.remote_host=10.0.75.1
  # xdebug.remote_connect_back=1
  </code></pre>
  
  <p>My Windows IP as seen by docker seems to be 10.0.75.1 (PHP shows 10.0.75.1 for $_SERVER['REMOTE_ADDR'] when visited from Windows). It's also the DockerNAT virtual device IP.</p>
  
  <p>PHPStorm (on Windows) is listening to Xdebug on port 9000.
  I have bound port 9000 to 9000 for this container :  </p>
  
  <pre><code>web:
      build: php5
      ports:
          - "80:80"
          - "9000:9000"
  </code></pre>
  
  <p>Windows firewall is off. Still, PHPStorm doesn't get any incoming connection from this container.  </p>
  
  <p>Therefore I tried to telnet it from different places :<br>
  when I telnet 10.0.75.1 9000 from windows it connects successfully when PHPStorm is listening and returns this error when it is not listening : "Could not open connection to the host on port 9000 : connect failed" . This makes perfect sense.<br>
  Same thing when I try from another computer on my local network, telnet 192.168.1.4 9000 works fine.<br>
  But from my Docker's web container even though I can successfully ping 10.0.75.1 and telnet this IP on port 80 either (it connects), on port 9000 it returns an error whether PHPStorm is listening or not :</p>
  
  <pre><code>root@fd60276df273:/var/www/html# telnet 10.0.75.1 9000
  Trying 10.0.75.1...
  telnet: Unable to connect to remote host: Connection timed out
  </code></pre>
  
  <p>I've tried to change Xdebug port to some random other numbers and it doesn't change anything...</p>
  
  <p>Do you have any idea what could cause this issue ?</p>