Skip to content

Instantly share code, notes, and snippets.

@paulmaclean
Last active April 15, 2019 14:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save paulmaclean/385f2ae9aee5058dbfcf026c0b6d4fb8 to your computer and use it in GitHub Desktop.
Save paulmaclean/385f2ae9aee5058dbfcf026c0b6d4fb8 to your computer and use it in GitHub Desktop.
Xdebug for PHP 7 in Acquia DevDesktop with PHPStorm
  1. Download and make Xdebug
wget http://xdebug.org/files/xdebug-2.5.5.tgz
tar xvf xdebug-2.5.5.tgz
rm xdebug-2.5.5.tgz
cd xdebug-2.5.5
/Applications/DevDesktop/php7_0/bin/phpize
./configure --enable-xdebug CC="gcc -arch i386" CXX="g++ -arch i386" -with-php-config=/Applications/DevDesktop/php7_0/bin/php-config
make
mv modules/xdebug.so ../
cd ..
rm -rf package.xml xdebug-2.5.5
  1. Edit the DevDesktop php.ini
sudo nano /Applications/DevDesktop/php7_0/bin/php.ini

#Add these lines to the ini

zend_extension="/Applications/DevDesktop/php7_0/ext/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_log=/tmp/xdebug.log
xdebug.idekey=PHPSTORM
  1. Restart Acquia DevDesktop services

  2. Follow the Phpstorm config instructions here: https://docs.acquia.com/dev-desktop/sites/phpstorm

Sources

@shakyakrishna
Copy link

Can you please update it for php 7.1X64 version.

@bgnih
Copy link

bgnih commented Apr 15, 2019

If you get the error:

Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

on Mac, run homebrew install autoconf to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment