"xdebug on macos 10.13 with php 7" Answer’s

0

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:

  1. Installed autoconf with brew;
  2. Run phpize to configure the build for the new Zend engine;
  3. Run ./configure
  4. Run make

Now the new binary is under modules/xdebug.so

However macOS System Integrity Protection (SIP) will prevent you from overwriting the xdebug.so under /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!

Wednesday, March 31, 2021
 
BrunoRamalho
answered 11 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share