Installing Xdebug

This topic describes how to install Xdebug either on Zend Studio PHP executables or a local PHP Web server.

Note:

Xdebug cannot be used with PHP 5.5 executable (CLI and CGI) on Windows and Mac.

Installing Xdebug on a Zend Studio PHP Executable

This procedure describes how to install Xdebug on a Zend Studio PHP Executable. If you want to use Xdebug for debugging on a Web server, you will need to install Xdebug on your Web server as well. See Installing Xdebug on a PHP Web Server below for more details.

 

 

Instructions on how to complete a procedure

To install Xdebug:

  1. Download Xdebug from Xdebug Downloads page. To find out which version of the extension to download, click here.
  2. Disable the Zend Debugger:
    1. Open the 'php.ini' file of your PHP:

    <Zend_Studio_install_dir>\plugins\com.zend.php.debug.debugger.win32.x86_10.6.0.v20140121-1240\resources\php.ini

    1. Add a semi-colon ';' before "zend_extension=..." as follows:

    ;zend_extension="C:\Program Files (x86)\Zend\Zend Studio 10.6.0\plugins\com.zend.php.debug.debugger.win32.x86_10.6.0.v20140123-1837\resources\php53\ZendDebugger.dll"

  1. Move the downloaded file to your Zend Studio's installation files:

<Zend_Studio_install_dir>\plugins\com.zend.php.debug.debugger.win32.x86_10.6.0.v20140121-1240\resources\php_version

  1. Back in the 'php.ini' file, add the path to the Xdebug extension.

For example:

Linux and Mac OS: zend_extension="/usr/local/php/modules/xdebug.so"

Windows: zend_extension="<path to .dll file>"

  1. Add the following line:

xdebug.remote_enable=true

  1. Save your changes, and restart your Web server.

Note:

To verify that Xdebug was installed correctly, call the “php --re xdebug” command. If the output is different than 'Exception: Extension xdebug does not exist', the extension is installed correctly.

Once installed, you can now configure Xdebug in Zend Studio to begin debugging.

Installing Xdebug on a PHP Web Server

This procedure describes how to install Xdebug on a PHP Web server.

 

 

Instructions on how to complete a procedure

To install Xdebug:

  1. Download Xdebug from Xdebug Downloads page. To find out which version of the extension to download, click here.
  2. If you are using Zend Server, disable the Zend Debugger (If not, skip to step 3).
    1. Access the Zend Server UI (http://<server_ip>:10081/ZendServer).
    2. Go to the Configurations | Components page.
    3. Select the Zend Debugger from the components list, and click Disable in the Action bar.
    4. Restart Zend Server.

  3. Move the downloaded file to your Web server's installation files.

If you are using Zend Server:

<Zend_Server_install_dir>\lib\phpext

  1. Open your Web server's 'php.ini' file.

If you are using Zend Server:

<Zend_Server_install_dir>\etc\php.ini

  1. Back in the 'php.ini' file, add the path to the Xdebug extension.
    For example:

Linux and Mac OS: zend_extension="/usr/local/php/modules/xdebug.so"

Windows: zend_extension="<path to .dll file>"

  1. Add the following line:

xdebug.remote_enable=true

  1. Save your changes, and restart your Web server.

Note:

To verify that Xdebug was installed correctly, call the “php --re xdebug” command. If the output is different than 'Exception: Extension xdebug does not exist', the extension is installed correctly.

Once installed, you can now configure Xdebug in Zend Studio to begin debugging.