dreftymac dreftymac - 4 months ago 31
PHP Question

Step-by-step: How to do Xdebug troubleshooting connection to client IDE


Using Xdebug with PHP and Komodo IDE, and Eclipse PDT.

Xdebug is installed on the server and working properly. This is confirmed because the Xdebug code commands work as expected when inserted into PHP files on the server.


Connecting to the client workstation is not working, and it is difficult to determine why because it fails with multiple IDEs.


It would be nice to have a step-by-step checklist to troubleshoot the case where you know Xdebug is installed and working on the server, but the client does not connect.

Can anyone help add to this to make a comprehensive troubleshooting checklist?

Specifically, is there any bare-bones way to make sure the network traffic is reaching the client, and is correctly formatted in the way the IDE expects to see the data?

  • SSH into web host and try to reach the client:

    • can host reach client at all? (ping -c 5 xxx.xxx.xxx.xxx )

    • can host reach port 9000? (nmap -p 9000 xxx.xxx.xxx.xxx)

    • if the above two succeed, what should the output be?

    • if the above two fail, what is the next troubleshooting step?

  • Verify settings of software-based firewall on client

  • Verify settings of iptables on linux host

  • Verify hardware firewall b/t client and host


The goal is to find some solution where the person on the client machine can at least confirm that something is reaching the client without having to determine whether the IDE is the problem, since IDE is another level of complexity that may be introducing problems.


This is something I would definitely want to include in the Xdebug documentation. I think it would work best to have many people collaborate on this, so I've created a file in the xdebug.org github repository (https://github.com/derickr/xdebug.org/blob/master/html/docs/tutorials/troubleshooting.rest) to collect tips. Feel free to fork and extend!

On the Xdebug side, in the upcoming version (2.2) it already dumps in its xdebug.remote_log file a couple of extra diagnostics such as whether it tried to connect and whether the connection was accepted or denied.