sudo pecl install xdebug
Then I added the file /etc/php.d/xdebug.ini with the lines:
extension=xdebug.so xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000
Running php -i, yields amongst others, the following message:
xdebug support => enabled
Version => 2.1.1
XDEBUG NOT LOADED AS ZEND EXTENSION
Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.145 $
All good so far. Now I need to set up the debugging proxy server on the webserver host so that multiple developers can debug scripts from the same dev webserver.
To do this, I followed the instructions provided by Komodo using their python-based proxy server:
export PYTHONPATH=/lib/support/dbgp/pythonlib;$PYTHONPATH cd /lib/support/dbgp/bin python pydbgpproxy -i 22.214.171.124:9001 -d localhost:9000 -l DEBUG
So now I have configured Komodo to use the proxy server for debugging.
Now to initiate a debugging session with a website script, I followed the instructions provided by Komodo:
Listen for Debugger Connections
Then in the browser, enter the URL of the script and append:
Now Komodo asks to start a debug session where I click Yes, and …. The script completes and no debugging occurs. 😦
Seems more investigation is required here.
I am wondering whether the ajax calls in the script I am attempting to debug are confusing the proxy and or Komodo? Each ajax call will also have the cookie set for debugging and so there are multiple requests do debug with the same Komod instance. Perhaps this is why the debugger is not working.
I am hopeful I can get this working. Will save alot of time trying to find those nasty bugs.