php - Netbeans Xdebug 安装+PHP+ ubuntu 操作系统

标签 php ubuntu netbeans xdebug

<分区>

Possible Duplicate:
Xdebug and Netbeans are not communicating with each other

如何在 netbeans 中实现 xdebug。我搜索了很多,我在 apache php.ini

中做了一些事情
zend_extension=/path/to/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

我正在使用 Ubuntu 操作系统。

Xdebug 主要用于调试复杂的php代码。( for loop/foreach)

现在,当我点击调试项目 netbeans 时,页脚状态显示正在搜索 xdebug 连接,它没有结束意味着连接失败。

我想你得到了我想要的。

请帮帮我。

最佳答案

最近我在 ubuntu 中用 netbeans 配置了 xdebug

以下是使用 netbeans 安装和配置 xdebug 的步骤

1) 转到此页面并安装 Firefox 插件:

   https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/

2) 从命令提示符(终端)使用下面的命令安装 xdebug

   sudo apt-get install php5-xdebug

3) 然后从终端打开 xdebug.ini:

gedit /etc/php5/conf.d/xdebug.ini

4) 复制那里唯一的一行。 (应该是这样的:

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so).

5) 使用此命令以 super 用户权限打开 php.ini 文件

sudo gedit /etc/php5/apache2/php.ini

6) 将您从 xdebug.ini 复制的行连同以下四行粘贴到您的 php.ini 文件中:

将复制的行粘贴到这里

                      xdebug.remote_enable=On;
                      xdebug.remote_host="localhost;"
                      xdebug.remote_port=9000;
                      xdebug.remote_handler="dbgp"; 

7) 完成了!!!只需要重新启动你的apache:

为此使用以下命令:

sudo /etc/init.d/apache2 restart

现在只需在 netbeans 中打开项目并按 ctrl+F5 或单击 debug>debug project 从菜单。

希望对你有所帮助。

关于php - Netbeans Xdebug 安装+PHP+ ubuntu 操作系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14079468/

相关文章:

java - 具有 "my type"列的数据库表

Netbeans 新手——如何启用从 javadoc JAR 文件查看信息

java - 自动将 `insertable = false, updatable = false` 添加到 Netbeans 生成的实体

php - CakePHP 3 Ldap 身份验证问题和说明

php - 在一条记录上连接一张表的多行 (Codeigniter 3)

php - 在 laravel 中生成视频缩略图时出错

ubuntu - Icinga2 正在监控同一个主机

Eclipse 菜单在 Ubuntu-13.10 中失真

php - 删除 WordPress 链接中图像下的行

ubuntu - Vundle-E492 : Not an editor command: PluginInstall