下载xdebug源文件 使用phpize编译xdebug.so
Mac 10.11 phpize报以下错误:
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
使用sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/ include /usr
如果使用sudo也报错:Operation not permitted
解决方法,执行以下方法安装command line tool就自动会帮你配置好Unix开发环境:
xcode-select --install
编译成功后获取xdebug.so 在php.ini中配置 最后重启apache