2

Here's a confusing one.

I need to use XDebug for a remotely-hosted PHP project. The remote server is firewalled and only accepts connections from a second remote server, so in order to connect to the project server I need to connect via an SSH proxy.

This part isn't a problem; I connect via PuTTY using it's Proxy setting, and then I have set up port tunnels for communication with XDebug between my local machine and the project server.

I tunnel from my local machine to SSH port 22 on the remote server (via port 2222 locally), and I tunnel from the remote server to port 9009 on my local machine where the PHPStorm XDebug client listens.

In theory this seems to work; requests are being tunnelled between my local machine and the project server, all via the "middle" machine's proxy.

However, PHPStorm refuses to admit it can connect to XDebug. It validates the setup as all being OK, and can "see" the XDebug server. XDebug's remote log says the connection was successful, but PHPStorm thinks otherwise.

PHPStorm validates the settings (remember localhost is used because the port is tunnelled): enter image description here

But I get this error when trying to run the debugger:

enter image description here

XDebug says the connection is successful:

[25936] Log opened at 2020-03-12 05:31:10
[25936] I: Connecting to configured address/port: localhost:9009.
[25936] I: Connected to client. :-)
[25936] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/xxx/index.php" language="PHP" xdebug:language_version="7.2.24" protocol_version="1.0" appid="xxx" idekey="PHPSTORM"><engine version="2.9.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>

Other PHPStorm settings:

enter image description here

PuTTY settings:

enter image description here

enter image description here

WackGet
  • 797

0 Answers0