Xdebug for Remote Server Not Connecting

Xdebug for remote server not connecting

The server running PHP (and XDebug) needs to be able to connect to your workstation/desktop.

Diagram

So you'll need the server set up accordingly by either telling it to connect to a specific IP-address (xdebug.remote_host) or to automatically "connect back" (xdebug.remote_connect_back). The latter has some security implications, though. These are outlined in the manual.

xdebug remote server and SFTP - cannot connect

Probably, the first thing to check is whether Xdebug actually tries to connect to your IDE. You can do that, by adding:

xdebug.remote_log=/tmp/xdebug.log

to your php.ini file. When you then initiate debugging, there should be information in the /tmp/xdebug.log file, where it will tell you where it tried to connect too, and whether the connection succeeded or failed.

If you get something like:

I: Remote address found, connecting to 192.168.128.56:9000.
E: Could not connect to client. :-(

That means that either your IDE wasn't listening for something, or that there is a firewall preventing an incoming connection, or that the IP address is incorrect.



Related Topics



Leave a reply



Submit