为 drupal 站点设置 Xdebug
我一直在尝试让 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 中具有相同内容的内容,我也尝试过。我尝试将 localhost 更改为xyz.com,但没有成功。 我还需要知道netbeans中的项目配置应该是什么。例如 xyz:8081/drupal?
谢谢大家,
I have been trying to get xdebug, netbeabs 7.0 and drupal work to no avail. The drupal site is hosted remotely on xyz.com:8081. The port forwarding is setup to forward the port 9000 to the host in that network. xdebug is installed and correctly shows up in phpinfo() but my netbeans says "waiting for connection (netbeans-xdebug)". Below is what I have in my 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
also I read some where that I have to have the same in my /etc/php5/cli/conf.d/xdebug.ini and I tried that too.I tried change the localhost to xyz.com and it didn't work.
I also need to know what should be the project configuration in netbeans. for instance xyz:8081/drupal?
Thank you all,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Xdebug 需要通过指定的端口连接回您的工作站。尝试这样的事情。关键是服务器将连接回您的工作站,因此如果您位于 nat'd 防火墙后面,那么您需要将端口转发 9000 到运行 netbeans 的工作站。
其中一些设置在这里有更详细的描述: http://www.flingbits.com/tutorial/view/xdebug-for-developing-debugging-and-profiling-php
这里还有 netbeans 特定的设置信息:http://wiki.netbeans.org/HowToConfigureXDebug
Xdebug needs to connect back to your workstation on the port specified. Try something like this. The key is that the server will connect back to your workstation, so if you're behind a nat'd firewall then you need to port forward 9000 to your workstation running netbeans.
Some of these settings are described in more detail here: http://www.flingbits.com/tutorial/view/xdebug-for-developing-debugging-and-profiling-php
There's also netbeans specific setup info here: http://wiki.netbeans.org/HowToConfigureXDebug