title: How to debug connections from virtual machine
body: <p>I have a website (say, <code>test.com</code>) with PHP code running on Ubuntu with nginx. I can debug it via PhpStorm and Xdebug 2.</p>
  <p>And now I want to debug it (specifically, use breakpoints in PhpStorm) when requests are going from my VMware machine with Windows 10. For example, I can run <code>test.com</code> in guest machine's browser and it will show the website, but at the same time Xdebug or PhpStorm don't stop at breakpoints.</p>
  <p>My <code>/etc/hosts</code> contains the following string:</p>
  <pre><code>192.168.50.11 test.com
  </code></pre>
  <p>And here is my <code>20-xdebug.ini</code> config:</p>
  <pre class="lang-ini prettyprint-override"><code>[xdebug]
  zend_extension=xdebug
  xdebug.mode = debug
  xdebug.remote_enable = 1
  xdebug.remote_host = 127.0.0.1
  xdebug.remote_port = 9003
  xdebug.start_with_request=yes
  xdebug.log=&quot;/var/log/nginx/xdebug.log&quot;
  xdebug.idekey = PHPSTORM
  </code></pre>
  <p><strong>UPDATE:</strong> As Eugene Morozov suggested in comments, I tried to change <code>xdebug.remote_host</code>. Here is excerpt from <code>ip address</code> on Ubuntu host:</p>
  <pre><code>3: vmnet1: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
      link/ether 00:50:56:c0:00:01 brd ff:ff:ff:ff:ff:ff
      inet 172.16.162.1/24 brd 172.16.162.255 scope global vmnet1
         valid_lft forever preferred_lft forever
  4: vmnet8: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
      link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff
      inet 192.168.212.1/24 brd 192.168.212.255 scope global vmnet8
         valid_lft forever preferred_lft forever
  </code></pre>
  <p>So I tried to set <code>remote_host</code> to both <code>172.16.162.1</code> and <code>192.168.212.1</code> with no luck (each time I restarted PHP-service and tried to set corresponding IP to DBGp Proxy setting in PHPStorm).</p>
  <p><strong>UPDATE 2:</strong> Thanks for commenters: I updated Xdebug to 3rd version and now it's working with VM connections too.</p>