Retro Style

Configure Acquia Dev Desktop to use Xdebug on Windows

Debugging like it’s 1999!

Photo by Mister Starman on Unsplash

Prerequisites

Gathering Requirements

Requirement #1: PHP architecture

PHP architecture listed at the Drupal admin/reports/status/php page.

Requirement #2: Thread Safe (TS) vs Non-Thread Safe (NTS)

Downloading Xdebug for Windows

Downloading Xdebug extensions for Windows

Rename and move Xdebug


cd %HOMEDRIVE%\Users\%USERNAME%\Downloads
cp php_xdebug-2.9.6-7.1-vc14-x86_64.dll php_xdebug.dllmv php_xdebug.dll "C:\Program Files (x86)\DevDesktop\php7_1_x64\ext"
mv: cannot move to 'C:\Program Files (x86)\DevDesktop\php7_1_x64\ext/php_xdebug.dll': Permission denied
ls -la "C:\Program Files (x86)\DevDesktop\php7_1_x64\ext\php_xdebug.dll"-rwxr-xr-x 1 wario 197609 235520 Jun 17 23:58 'C:\Program Files (x86)\DevDesktop\php7_1_x64\ext\php_xdebug.dll'

Add Xdebug to php.ini

Select the PHP.ini file to edit
[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
Restart the Dev Desktop stack using the Start/Stop button.

Verify that Xdebug is installed

Xdebug defaults

Configure Visual Studio Code for Xdebug

Create a new configuration
Launch template suggestions
New launch.json template for PHP and Xdebug

Configure Google Chrome and test

It’s aliiiiive !!!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Callback Insanity

Organic, fair-sourced DevOps and Full-Stack things. This is a BYOB Establishment — Bring Your Own hipster Beard.