Linux中的Netbeans和Xdebug [英] Netbeans and Xdebug in Linux

查看:69
本文介绍了Linux中的Netbeans和Xdebug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Xdebug,并且可以从phpinfo()确认它已正确安装.我已经完成了google"netbeans xdebug安装等"随附的所有站点中给出的所有步骤.

I have installed Xdebug, and I can confirm from phpinfo() that it is correctly installed. I have taken all the steps given in all of the sites that come up with I google "netbeans xdebug install, etc".

它在Netbeans中仍然不起作用. 有人可以提供任何建议吗?

It still does not work in Netbeans. Is there any advice that someone can offer?

这是我的php.ini调试部分...

Here is my php.ini debug section...

[xdebug]
zend_extension = /usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_mode = "req"
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.idekey = "netbeans-xdebug"

任何帮助将不胜感激!

推荐答案

由于提供给我的信息很少,因此我必须更详细地描述设置.

Since the information available to me is very sparse, I have to describe the settings in more detail.

Netbeans和xdebug设置.

Ubuntu 12.04 LTS精确的穿山甲

Ubuntu 12.04 LTS Precise Pangolin

应该安装什么.

全局设置:

工具-选项

Tools -- Options

PHP设置:

使用 phpinfo(),您将获得..请参见下图.

With phpinfo() you get.. see below image.

只有一个 php.ini很重要!查看已加载的配置文件 如果您将xdebug条目写入另一个"php.ini"文件,请确保再次清除所有这些条目. (仅在一个php.ini中使用xdebug).还要查看已解析的其他.ini文件.我们稍后再讨论.

Only one php.ini is important ! Look at Loaded Configuration File If you wrote a xdebug entry into another "php.ini" file be sure to clear all these entries again. ( xdebug ONLY in one php.ini ). Look also at Additional .ini files parsed. We come to this later.

zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000

已解析其他.ini文件.
添加或控制,仅第一行必须与"php.ini"中的行相同.(不带")

Additional .ini files parsed.
Add or controlling, only the first line must be the same as in the "php.ini".( Without " " )

确保文件确实存在!

确保 session.save_path 确实存在!

控制应等于或大于等于的 xdebug 版本.(与PHP Version-5.3.10-1匹配).如果按照此答案中的描述进行了所有操作,但均不起作用,则很有可能是不正确或有缺陷的"xdebug.so".

Control the xdebug version that should be equal to or greater.( Matching PHP Version-5.3.10-1 ). If everything was done as described in this answer, and it does not work, then it is with great probability of an incorrect or defective "xdebug.so".

创建新的Php项目:

项目属性:
来源
在我们的测试程序中,重要很重要,项目文件夹和源文件夹完全相同!

Project Properties:
Sources
In our test program, it is important the Project Folder and Source Folder are exactly alike!

运行配置

开始调试:-按下调试"按钮

默认浏览器将打开,并保持在正在连接.. 的状态,而处于调试模式的Netbeans处于该状态.
(如果Netbeans无法打开浏览器或无法连接,请返回高级Web配置,然后选择不打开Web浏览器.关闭并重新打开浏览器,然后输入URL如下所示)

The default Browser opens and remains at Connecting .. stand while Netbeans in debug mode is.
(If Netbeans do not open a Browser or can not connect, go back to Advanced Web Configuration and select Do Not Open Web Browser. Close an reopen the browser and type the URL as seen below)

浏览您的代码.完成调试后,您将仅在浏览器中看到某些内容.不要忘记按下停止按钮 .如果您忘记了此xdebug的运行.

Go through your code. You will see only something in the browser when you're done with the debugging. Don't forget to press the Stop Button . If you forget this xdebug is running on.

完成:

这篇关于Linux中的Netbeans和Xdebug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆