MAMP xdebug URL没有';t';构造';localhost:8888使用Netbeans


MAMP xdebug URL doesn't 'construct' localhost:8888 using Netbeans

我正在运行的内容:

  • Mac OSX 10.6.8
  • MAMP 2.0.5
  • Netbeans 7.0.1

php.ini 中的当前设置

[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1

看起来我在php.ini文件中对xdebug的设置是正确的,因为我的网页在典型的橙色表格中显示了php错误和注意事项。

但是当我点击Netbeans中的调试按钮时,它会生成一个以http://localhost/sitename/XDEBUGSESSIONblabla而不是http://localhost:8888/sitename/XDEBUGSESSIONblabla 开头的URL

在php.ini文件中,我尝试了设置
xdebug.remote_host=localhost
以及
xdebug.remote_host=localhost:8888

我注释掉了php.ini文件中的所有zend变量,但没有注释[xdebug]下面的zend_extension,也就是说:zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

php.ini文件中的[xdebug]部分上方还有一个[xcache-common]-部分,其中也有一条关于zend_optimizer的规则,我没有注释它,因为它不属于php.ini文件的[Zend]部分。

顺便说一句:我在php.ini文件中实际上找不到任何[Zend]部分,但我在下面的教程中看到了它:

在这里和此处

第二次在Netbeans项目URL设置中将:8888放在localhost之后就可以了。因此,这意味着在创建项目后,右键单击项目文件夹,然后在对话框中的"运行配置"下,顶部的第三个字段显示"项目URL"。在项目创建后,您可以在此处对其进行更改。