title: Xdebug remote host VSCode
body: <p>I'm using VSCode and this plugin <a href="https://github.com/felixfbecker/vscode-php-debug" rel="nofollow noreferrer">https://github.com/felixfbecker/vscode-php-debug</a> .</p>
  <p>I'm attempting to use Xdebug on a remote host.</p>
  <p>I am able to run Xdebug successfully with breakpoints when I run the local instance of the web app I'm debugging.</p>
  <p>When I go to the web address, I get this in the remote logs:</p>
  <pre><code>Log opened at 2020-12-01 06:25:23
  I: Checking remote connect back address.
  I: Checking header 'HTTP_X_FORWARDED_FOR'.
  I: Checking header 'REMOTE_ADDR'.
  I: Remote address found, connecting to my_local_ip_address:9000.
  E: Time-out connecting to client. :-(
  Log closed at 2020-12-01 06:25:23
  </code></pre>
  <p>On my localhost, when this happens, I'm getting an entry in my tcpdump as well, so it seems to be connecting, but it is not connecting within VSCode.</p>
  <p>When I run <code>telnet my_local_ip_address 9000</code> from my remote host, I get an almost identical tcpdump on my localhost, as well as this message from the debug log within VSCode:</p>
  <pre><code>&lt;- launchResponse
  Response {
    seq: 0,
    type: 'response',
    request_seq: 2,
    command: 'launch',
    success: true
  }
  
  new connection 1
  </code></pre>
  <p>So telnet does not seem to have a problem connecting from the remote host to my localhost, so it doesn't seem to be a connectivity problem.</p>
  <p>But when I start Xdebug in VSCode, I get the remote logs filled, and my Xdebug console stays like this:</p>
  <pre><code>&lt;- launchResponse
  Response {
    seq: 0,
    type: 'response',
    request_seq: 2,
    command: 'launch',
    success: true
  }
  </code></pre>
  <p>and does not echo any connection.</p>
  <p>My remote php.ini variables look like this:</p>
  <pre><code>zend_extension=&quot;xdebug.so&quot;
  xdebug.remote_enable=1
  xdebug.remote_connect_back=1
  xdebug.remote_autostart=1
  xdebug.remote_handler=dbgp
  xdebug.remote_mode=req
  xdebug.remote_port=9000
  xdebug.remote_log=/tmp/xdebug.log
  </code></pre>
  <p>I'm not sure where to go from here.</p>