为drupal站点设置Xdebug


Setting up Xdebug for drupal site

我一直试图得到xdebug, netbeabs 7.0和drupal工作无效。drupal站点远程托管在xyz.com:8081上。端口转发设置为将端口9000转发到该网络中的主机。Xdebug已安装并正确显示在phpinfo()中,但我的netbeans说"等待连接(netbeans- Xdebug)"。下面是我在php.ini

中的内容
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.remote_connect_back=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

我也读了一些地方,我必须在我的/etc/php5/cli/conf.d/xdebug.ini中有相同的,我也试过了。我试图改变本地主机到xyz.com,它没有工作。我还需要知道什么应该是netbeans的项目配置。例如xyz:8081/drupal?

谢谢大家,

Xdebug需要在指定的端口上连接回您的工作站。试试这样做。关键是服务器将连接回您的工作站,所以如果您在nat防火墙后面,那么您需要将9000端口转发到运行netbeans的工作站。

xdebug.remote_enable=1
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.idekey=NETBEANS_DBGP
xdebug.remote_handler=dbgp
xdebug.remote_host=IP_OF_YOUR_WORKSTATON

这些设置在这里有更详细的描述:http://www.flingbits.com/tutorial/view/xdebug-for-developing-debugging-and-profiling-php

这里也有netbeans特定的设置信息:http://wiki.netbeans.org/HowToConfigureXDebug