I'm having trouble debugging PHP. What do I do?

If you receive an error message when attempting to debug a PHP program or if the debugging process does not proceed as expected, verify that you have installed PHP and the Xdebug extension as per the instructions in the Debugging PHP documentation, then check the following:

Confirm PHP Configuration


In the command or shell window, enter php -m. "xdebug" should be listed under Zend Modules (and not under PHP Modules). If this is not the case, your configuration is incorrect. See "Common PHP Configuration Problems" below.

Syntax Checking

In Komodo, select Edit|Preferences. Click on Smart Editing, and ensure that "Enable background syntax checking" is checked. Open a PHP file and enter something that is syntactically incorrect, such as:

echo test;

Komodo should display a red squiggly line under echo test;. If it does not, it indicates that Komodo is not able to communicate with the PHP interpreter.


If the steps above were successful, ensure that the debugger is functioning by opening a PHP program and debugging it. Ensure that the correct Preferences are configured for PHP.

If any of the steps above were unsuccessful, proceed to the next section.

Common PHP Configuration Problems

Multiple PHP executables on one machine

In Komodo's Preferences, explicitly specify the PHP interpreter configured in your php.ini file. The location of the php.ini file can also be explicitly set.

Verify the PHP version

PHP 4.4 or higher is required.

Verify Xdebug library specification

The location of xdebug.dll (Windows) or xdebug.so (Linux) must be defined the php.ini file, for example:

  • Windows:
  • Linux:

Ensure that the Xdebug extension is configured correctly in the php.ini file as per the Remote PHP Debugging instructions.

Version Error Messages

If you receive a dialog with the following warning message:

xdebug: Unable to initialize module
Module compiled with debug=0, thread-safety=1 module API=20001222
PHP compiled with debug=0, thread-safety=1 module API=20001222
These options need to match

... download an updated version of xdebug.dll (Windows) or xdebug.so (Linux) from the Xdebug.org site.