且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

OS X 10.9小牛上的PHP Xdebug

更新时间:2023-01-25 14:39:09

快速复制粘贴方式

sudo sh -c 'echo zend_extension=$(find /usr/lib/php/extensions -name "xdebug.so") >> $(php -qr "echo php_ini_loaded_file();") && apachectl restart'

此命令执行以下操作:

  • 找到Xcode随附的本机Xdebug扩展
  • 询问php加载了哪个配置文件
  • 在配置文件中添加Xdebug扩展路径
  • 重新启动apache.

与Sierra,El Capitan&优胜美地(Yosemite)带有捆绑式Apache,但未经MAMP& XAMPP.

Compatible with Sierra, El Capitan & Yosemite with the bundeled apache, but untested with MAMP & XAMPP.

在启动命令之前,请确保已安装Xcode命令行工具:xcode-select --install

Before launching the command, make sure Xcode command line tools are installed : xcode-select --install