title: Remote Xdebug with VirtualBox
body: <p>I'm trying to get remote debugging to work.  The PHP is running on a VM and I'm trying to debug from NetBeans on the host machine.</p>
  
  <p>I've followed the instructions <a href="http://xdebug.org/docs/remote">here</a>, forwarded port 9000 in the Windows 7 firewall and in the VirtualBox network settings, and set up path mappings in NetBeans.  My xdebug settings look like this:</p>
  
  <pre><code>xdebug.remote_enable = On
  xdebug.remote_connect_back = On
  xdebug.idekey = "netbeans-xdebug"
  xdebug.remote_log = /tmp/xdebug.log
  </code></pre>
  
  <p>When I load the URL I want to debug (using the correct idekey) it logs the following:</p>
  
  <pre><code>I: Checking remote connect back address.
  I: Remote address found, connecting to 192.168.0.1:9000.
  I: Connected to client. :-)
  -&gt; &lt;init xmlns="urn:debugger_protocol_v1" 
           xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
           fileuri="file:///home/dev/web/projects/project.com.vm/httpdocs/index.php" 
           language="PHP" protocol_version="1.0" 
           appid="1380" 
           idekey="netbeans-xdebug"&gt;
     &lt;engine version="2.2.1"&gt;&lt;![CDATA[Xdebug]]&gt;&lt;/engine&gt;&lt;author&gt;&lt;![CDATA[Derick Rethans]]&gt;&lt;/author&gt;&lt;url&gt;&lt;![CDATA[http://xdebug.org]]&gt;&lt;/url&gt;&lt;copyright&gt;&lt;![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]&gt;&lt;/copyright&gt;&lt;/init&gt;
  
  -&gt; &lt;response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"&gt;&lt;/response&gt;
  </code></pre>
  
  <p>However, NetBeans remains waiting for a connection.  I've got it set up to stop at the first line, in addition to having a breakpoint set.  The log file will include the "Connected to client" message even when NetBeans is not listening.</p>
  
  <p>Any idea what I might be missing?</p>
  
  <p>Thanks.</p>