Installation

There are a number of steps to ensuring we get all the applications communicating with each other.

  1. Download and install the Apache 1.3 / PHP 4.3.11 installer package from entropy.ch
  2. Download and install Activestate Komodo, (you can get a 30-day version so you can try before you buy). I am using version 3.5 personal edition.
  3. Run Komodo.
  4. Select Komodo → preferences from the menu
  5. Expand the Languages Category on the left of the dialog box, and select PHP. You should now see something like the following:
Komodo PHP Preferences
PHP Preferences in Komodo
Now we need to ensure we are using the correct php, and that we select this as the Default PHP Interpreter. So at the terminal check what php is being picked up in the path using the which command, then find out what php version we're using and whether it has Xdebug.
Check php version
Now Path to alternative PHP configuration file is where we'll store a php.ini and Xdebug library so specify somewhere under your home directory. The php.ini file will contain debug variables defining how we want to debug. I created a Komodo directory and a debug subdirectory to it to store mine.
Let's click on the Debugger Config Wizard button and setup the debugger.

Activestate Komodo Debugger Configuration Wizard

Let's run through the wizard.

 

Debug wizard screen 1
Initial screen of the debugger wizard.
Click continue.

Debugger Wizard screen 2
Select the php to use in Installations found on your system field, this should be the one which has Xdebug.
Again for Setup this installation you should have the same value as the other selected field in this dialog.
Click the Continue button. Now in the next screen the INI file to be copied should be from a path below where the selected php executable is, while the Put debug version of ini at should be set to a directory somewhere below your home directory.
Debugger Wizard screen 3
Click the Continue button. The next screen asks us where our extensions directory is. The path here should be the same path as that specified in the previous screen under the Put debug version of ini at field.
Debugger Wizard screen - php extension directory
Click the Continue button. Here we can review the settings we have entered, and then click the Continue button.
Debugger Wizard screen 6
Finally we are informed that we have finished the installation.
Debugger Wizard screen 7
Now we just need to see what it has created and whether it works.

Checking the configuration

Let's see if it works. There is a utility on the Start Page of Komodo for doing this, however we will also look at the php.ini file that the wizard created and add a few more parameters to get it all working.

To start with, we can use the Check Configuration feature on the Komodo Start Page:

Komodo Check Configuration link

Click on the Check Configuration link and if all is well you should see something like the following:

Komodo Check Configuration link - finished
Now we should look at the php.ini file created by the wizard. So load it up in your favourite editor.
php ini file
Here we can see what the wizard added. I found in my version of Komodo that the remote_host and ide_key values were not defined so I added them. My configuration did not seem to work without them. You may find similar problems and may need to change your remote_host to 127.0.0.1
One final test would be to do a phpinfo test in your web browser and ensure you can see Xdebug defined in the resulting page. If you cannot then php is not configured correctly. From the command line a php -m will show the compiled modules, and if your path is picking up the correct php then you should see Xdebug listed under a [Zend Modules] section of the output.
Ok, now the moment of truth, let's try to debug something...