Important
End of Support notice! Acquia has stopped support for Dev Desktop on June 30, 2021. Acquia recommends that you transition to Acquia Cloud IDE for a managed development environment on Cloud Platform. For more information, see Migrating from Dev Desktop to Cloud IDE.
Acquia also provides limited integration with open source alternatives to Cloud IDE for local development. For more information, see Local development solutions.
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 includes xdebug.dll
as a part of its
default installation.
Note for PHP 7 users
PHP 7 does not include the required xdebug.dll
file. To download the
correct version for your server, access Xdebug.
To use Xdebug with Acquia Dev Desktop:
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.ini
files). 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 thezend_extension
, which will be the correct place to add the information in the following steps.Identify the
[xdebug]
section of your file, which contains a commented-out line beginning with;zend_extension
.Uncomment and modify the
zend_extension
line to add code similar to the following to the[xdebug]
section of your file:[xdebug] zend_extension="C:\Program Files (x86)\DevDesktop\php7_1_x64\ext\php_xdebug.dll" xdebug.remote_autostart=off ; Do not run Xdebug on every page request xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=localhost xdebug.remote_port=9000
Replace
C:\Program Files (x86)\DevDesktop\php7_1_x64\ext\php_xdebug.dll
with the location and name of the most recentxdebug.dll
file to use. For example, the following example could be useful for PHP 7.1 running on 64-bit Windows 7, with Acquia Dev Desktop installed in theC:\Program Files (x86)
directory:zend_extension="C:\Program Files (x86)\DevDesktop\php7_1_x64\ext\php_xdebug.dll"
Save the updated
.ini
file.Click OK.
Note
You may receive a pop-up window that says Name is empty. Go to the Acquia Dev Desktop > Preferences > General tab and enter values into the Your name and Email fields.
Confirming that Xdebug is working
To confirm that Xdebug is loaded and working:
On the main Acquia Dev Desktop Control Panel page, click
Start
to 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
php.ini
file.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 v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPache v7.2.13, Copyright (c) 1999-2018, by Zend Technologies with Xdebug v2.6.0, Copyright (c) 1999-2018, Derick Rethans
If the preceding output does not appear, you might need to the
php.ini
file again.
Next steps
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.