在 OS X Lion 10.7.6 上安装 xdebug


Installing xdebug on OS X Lion 10.7.6

所以我安装了xdebug,但我猜它是错误的版本,因为我下载了一个预编译版本并且它不起作用,所以我决定自己制作。我按照 xdebug 网站上的说明进行操作,在运行 phpize 时出现以下错误:

Cannot find config.m4. 
Make sure that you run './phpize' in the top level source directory of the module

当我在目录/usr/bin 中运行 phpize 时,我收到同样的错误。

当我尝试查看正在运行的 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: 

还有另一件阻止我前进的事情是我没有 gcc 编译器,我已经取消并重新安装了 xcode 两次,但没有占上风......

你应该使用 xdebug 源代码在目录中运行 phpize。它与xcode无关。然后你用 make 脚本编译它并将结果模块复制到 php 扩展文件夹。你确定你从 git 那里得到了正确的源代码吗?

XDebug 一直在工作,我没有在我的 php.ini 文件中打开html_errors,也没有在我的索引.php文件中更改application_env开发,因为我使用的是 zend 框架!很抱歉造成混乱。