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: