Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavMorr/a372192df3e9427bb4a597bcb2093657 to your computer and use it in GitHub Desktop.
Save DavMorr/a372192df3e9427bb4a597bcb2093657 to your computer and use it in GitHub Desktop.
Install xdebug on Mac and add Acquia DevDesktop support

Download and extract the xdebug source code (I used xdebug-2.5.5).

$ cd xdebug-2.5.5
$ /Applications/DevDesktop/php7_0/bin/phpize

and now the step that was the one that caused most grief figuring out...

$ ./configure --with-php-config=/Applications/DevDesktop/php7_0/bin/php-config CC="gcc -arch i386" CXX="g++ -arch i386"
$ make
$ cp modules/xdebug.so /Applications/DevDesktop/php7_0/ext/

open the php7_0/bin/php.ini file and (assuming it is the default) replace:

zend_extension="/Applications/DevDesktop/php5_6/ext/opcache.so"

with

;zend_extension="/Applications/DevDesktop/php5_6/ext/opcache.so"
[Xdebug]
zend_extension="/Applications/DevDesktop/php7_0/ext/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000

Stop and Start the server instance in DevDesktop and debug away.

From StackOverflow thread:

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