Xdebug CLI debugging on a shared development server.
Ben Waine <ben <at> ben-waine.co.uk>
2012-02-01 11:03:46 GMT
I'm having difficulty setting up command line debugging on a shared development environment. I've had this working in the past but this setup is slightly different.
I have a windows XP client running Netbeans and a shared development host running centos. Normal debugging of web pages is working fine and I can trigger debugging sessions in the usual way by passing a cookie in the request.
I'm trying to set up CLI debugging so I can debug my unit tests. PHPUnit is used on the remote host not the client.
Steps to achieve this:
1) Open a debugging session on the client.
2) Client shows 'waiting for connection' as usual.
3) Open SSH session with host.
4) Check value of $SSH_CLIENT - for use later.
5) Export environment variable as described in the docs: export XDEBUG_CONFIG="idekey=netbeans-xdebug, xdebug.remote_host=10.132.221.79"
6) Trigger PHPUnit
7) Expect connection with client at this point.
The PHPUnit tests run as normal but xdebug does not connect to the remote client. I've also tried the XDebugClient and can't achieve a connection here.
php -i | grep xdebug indicated remote connect back is on.
Is remote connect back the cause of my problem? Is it overriding xdebug.remote_host? It isn't listed as something I can change in the environment variable.
Am I setting the environment variable correctly?
Any additional steps required to configure host or client I'm not aware of?
The joys of a shared development environment!