Xdebug is a tool for debugging PHP. With it, you can do stack or function traces, memory allocation analysis, and script execution. Acquia Dev Desktop for Windows comes with
xdebug.dll as a part of its default installation.
To use Xdebug with Acquia Dev Desktop, complete the following steps:
- Open the Acquia Dev Desktop Control Panel, and then click Stop in the lower right corner of the application. If the stack is already stopped, a Start button will instead be displayed — do not click the button to start the stack.
- From the file menu, select Acquia Dev Desktop > Preferences, and then click the Config tab.
- In the Default PHP version list, click your desired version of PHP.
If you change the version, Acquia Dev Desktop will briefly display a dialog box stating Applying changes.
- In the Stack configuration files section, find the PHP field (which contains a list of
php.inifiles). Click the file for your selected version of PHP, and then click the Edit link to the right.
Acquia Dev Desktop opens a text editor to edit the file.
- In the text editor, remove any existing lines in the
[xdebug]section. If this section does not exist, search for the
zend_extension, which will be the correct place to add the information in the following steps.
- Add code similar to the following to the
[xdebug]section of your file:
xdebug.remote_autostart=off ; Do not run Xdebug on every page request
<complete_path_to_xdebug.dll>is the location and name of the most recent
xdebug.dllfile to use.
For example, the following example could be useful for PHP 5.2.17 running on a 64-bit Windows 7, installed Acquia Dev Desktop in the
C:\Program Files (x86)directory:
zend_extension="C:\Program Files (x86)\acquia-drupal\php5_2\ext\php_xdebug-2.2.1-5.2-vc9.dll"
- Save the updated
- Click OK.
Confirming that Xdebug is working
To confirm that Xdebug is loaded and working, complete the following steps:
- On the main Acquia Dev Desktop Control Panel page, click
Startto start the stack.
- Click Settings, and then click to the Config tab. Under the Stack configuration files, find the PHP Info, and then click the link for the PHP version that you're using and for which you edited the
- A web browser opens with the output from
PHPinfo(). Search for the word Xdebug, and if you see something like this, Xdebug is enabled:
This program makes use of the Zend Scripting Language Engine: Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
If the preceding output does not appear, you might need to the
After you have completed the procedures on this page, you will need to configure your IDE to communicate with Xdebug. For information about how to do this, refer to your IDE's help files or online resources.