Ok so I finally got it running myself it works perfectly! I'm assuming that the xdebug binary that comes with macOS High Sierra (found under:
/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so) is not compatible with PHP7's new Zend engine.
So I downloaded the latest source from the xdebug website and did the following:
- Installed autoconf with brew;
phpizeto configure the build for the new Zend engine;
Now the new binary is under
However macOS System Integrity Protection (SIP) will prevent you from overwriting the
/usr/lib/php/extensions/. I didn't want to disable this so I created a new directory path under
/usr/local/lib/php/extensions/ and copied the new binary to this location. I'm not sure if this directory is the best place to put it or if this is bad practice but it worked for me.
Finally I reconfigured my php.ini to use the new binary and everything worked perfectly!