Netbeans不会连接到xdebug . 我试过以下帖子的建议:
Debugging IDE's port connection to XDebug: "Waiting to Connect"
netbeans shows "Waiting For Connection (netbeans-xdebug)"
但它并没有解决我的问题 .
似乎Netbeans连接到xdebug,因为在等待连接时,对Web服务器[Apache2]的所有请求都被阻止 . 端口[9001]似乎正在使用中:
roxy@Pixy011 ~ $ sudo nmap -sS -O 127.0.0.1
Starting Nmap 6.00 ( http://nmap.org ) at 2013-11-28 20:48 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000029s latency).
Not shown: 990 closed ports
PORT STATE SERVICE
22/tcp open ssh
139/tcp open netbios-ssn
443/tcp open https
445/tcp open microsoft-ds
631/tcp open ipp
902/tcp open iss-realsecure
3306/tcp open mysql
8080/tcp open http-proxy
8081/tcp open blackice-icecap
9001/tcp open tor-orport <---- Opened by java
xdebug.ini:[我已经确认它是在phpinfo()中加载的]
zend_extension=/usr/lib/php5/20100525/xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_mode="req"
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9001
xdebug.idekey="netbeans-xdebug"
Netbeans配置:
Debugger port: 9001
Session ID: netbeans-xdebug
Stop at first line: Checked
All other options are unchecked
项目属性:
Host: 127.0.0.1
Port: 9001
编辑:我注意到Netbeans没有将XDEBUG_SESSION_STOP附加到URL . 我不认为这与此问题有关,因为Netbeans仅在关闭调试会话后打开页面 .
我也禁用了SELinux
5 回答
On Ubuntu 13.04 64bit php 5.4.9-4 Xdebug v2.2.3 netbeans 7.4
我有同样的问题,并通过以下方式解决:
1.继续http://xdebug.org/wizard.php按照说明编译自己的xdebug.so
2.在netbean 7.4一般选项(抱歉我没有声望10发布图像)测试连接 . 确保代理服务器上的设置正确:对我来说"No Proxy"正在运行 .
3.在php选项调试选项卡中将xdebug设置端口更改为9001或9000以外的其他设置 . 我选择9002但您可以尝试直到找到一个空闲端口(如果端口不是免费的,请告诉您)
4.在/etc/php5/conf.d/20-xdebug.ini中的php.ini OR for ubuntu users
这样做之后我可以再次调试php .
有同样的问题:
解决方案:重新启动NetBeans . 正在运行一个等待连接的死进程 .
这里Netbeans正在运行调试会话 . 请注意 CLOSE_WAIT 和 TIME_WAIT .
我有同样的问题,我已经尝试了很多解决方案我发现了但问题仍然存在 . 我试图按照enter link description here中的步骤进行描述
和
enter link description here
那,whttp:// localhost / abc / trunk / abc / backend / web /?XDEBUG_SESSION_START = netbeans-xdebughen我调试我的项目,我的netbeats仍在等待连接,直到我必须在我的网址中有以下“? XDEBUG_SESSION_START=netbeans-xdebug ” http://localhost/abc/trunk/abc/backend/web/?XDEBUG_SESSION_START=netbeans-xdebug 所以netbeans能够与xdebug连接
**在Windows 10上使用Netbeans 8.0运行内置于Web服务器的Netbeans **
php.ini文件中的以下选项为我解决了这个问题:
zend_extension ='C:\ php安装路径\ ext \ php_xdebug-2.5.0-5.6-vc11.dll'xdebug.remote_enable = on
对我来说这个问题似乎是通过使用.dll文件的完整路径来解决的 . 另外,因为我在路径名中有空格,所以我必须用引号括起路径(双重与单一似乎并不重要) . 另外,我必须设置xdebug.remote_enable选项 . 一旦我设置了两个选项,我就可以在Netbeans中选择Debug Application选项并启动调试器 .
我遇到了类似的问题,在我的情况下,我最近更新了我的php版本,xdebug配置是在唯一的php5文件夹中 . 只需要将旧的xdebug配置复制到新版本的新php.ini文件中,它就像以前一样工作 .
调试这个的一些技巧是:
首先检查xdebug是否安装,如果xdebug详细信息不存在则运行(php -v)然后安装并添加配置 .
在xdebug类别下打开phpinfo()检查是否加载了xdebug配置 . 检查以下设置 .
remote_enable = on,remote_handler = dbgp