【发布时间】:2014-05-21 03:37:35
【问题描述】:
我正在尝试在 MAMP 3.0.3 (PHP 5.5.10) 服务器上使用 Netbeans 8(使用 Java 1.8.0)调试 PHP 代码,整个过程在 Mac OS X 10.9.2 上运行。但是当我启动调试时,Netbeans 会显示一个进度条,上面写着“等待连接(netbeans-xdebug)”。它永远不会停止,所以我想它永远不会建立联系。当然,我的 webapp 的执行永远不会在我的断点处停止。
这里是我的 php.ini 中的 xdebug 配置:
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=on
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/Applications/MAMP/logs/xdebug_remote.log"
我尝试了很多在论坛上找到的东西,甚至在 stackoverflow 上找到的东西,但没有任何效果。其中:更改端口(在php.ini和Netbeans中的debug conf中),将localhost更改为127.0.0.1或我的真实IP,注释掉远程主机,检查我的时区是否在php.ini中设置(确实如此),用参数XDEBUG_SESSION_START=netbeans-xdebug 加载我的 waebapp 等等。
有什么想法吗?在这一点上,我愿意接受任何建议......
【问题讨论】:
标签: php netbeans configuration mamp xdebug