我一直在搜寻我能找到的所有资源,但都没有找到。当我开始调试会话时,我在 NetBeans 6.9 中收到可怕的“等待连接”消息。经过大量阅读,大多数人都能够让 phpinfo() 显示它加载了 xdebug 模块。我不是这样。
我使用这个调用通过 SVN 下载了源代码
svn co svn://svn.xdebug.org/svn/xdebug/xdebug/trunk xdebug
我切换到 xdebug 目录,然后在源代码上运行phpize
sudo /Applications/MAMP/bin/php5/bin/phpize
Password:
grep: /Applications/MAMP/bin/php5/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php5/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php5/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
一个大胖子没事!引用的目录甚至不存在。因此,我假设我在此之后所做的任何 .ini 调整都是无用的。如果我执行 whereis php,我会在 /usr/bin 中找到它。这是操作系统预装的默认 php。我不想要那个。我需要使用与 MAMP 一起安装的 php。我无法相信让这个东西工作起来是多么令人沮丧!
作为记录,我的 php.ini 中的 xdebug 部分如下所示:
[xdebug]
; xdebug config for Linux and Mac OS X
zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"
xdebug.profiler_enable=1
xdebug.profiler_output_name=xdebug.cachegrind-out.%s.%p
xdebug.remote_log="/Applications/MAMP/logs/xdebug_log.log"
这是使 xdebug 工作的许多不同尝试的混合体。所以,我不知道哪些作品是有效的。
我把自己置于专家的摆布之下,因为我显然不是他们中的一员。在这一点上,我完全不知道如何进行。
提前致谢。