2010-06-13 67 views
3

我一直在试图配置XDebug的处理NetBeans一起工作,我目前的配置是的XDebug在NetBeans不会绑定到端口9000

[xdebug] 
zend_extension="C:\binaries\php\ext\php_xdebug-2.1.0RC1-5.3-vc6.dll" 
xdebug.remote_enable=on 
xdebug.remote_handler=dbgp 
xdebug.remote_host=127.0.0.1 (also tried localhost) 
xdebug.remote_port=9000 
xdebug.idekey="netbeans-xdebug" 

我试图解释如何通过一个NetBeans博客提供的测试测试配置是否工作时绑定它只是输出“无法绑定”

有什么建议吗?

+0

根据Xdebug文档,参数'xdebug.remote_enable'采用'0'或'1'值(默认为“0”),而不是“on”或“off”。我希望这个评论会有帮助。 – 2015-01-31 12:32:21

回答

2

几件事情把我的头顶部...

首先,确认没有其他已在侦听端口9000(在命令行中键入netstat -an上)。

如果没有显示任何内容,请确保Windows防火墙未启用。

1

这是我对同一问题的解决方案。

php.ini中xdebug的配置被最小化了。

的php.ini:

[XDebug] 
zend_extension = C:\Bitnami\wampstack-5.6.21-2\php\ext\php_xdebug.dll 
xdebug.remote_enable=1 
xdebug.remote_handler=dbgp 
xdebug.remote_host=127.0.0.1 
xdebug.remote_port=9001 
xdebug.remote_autostart=0 
xdebug.remote_connect_back=0 

右键单击项目>运行配置:

Project URL: http://127.0.0.1:9000/<ProjectName>/ 
Index File: index.php 

工具>选项> PHP>调试

Debugger Port: 9001 
Session ID: netbeans-xdebug 
Maximum Data Length: 2048 
uncheck all Checkboxes 

的调试器端口必须是另一个比服务器端口。在NetBeans中定义的端口必须匹配在php.ini(Xdebug的端口)和的httpd(Apache的端口)定义的一个

Server: 127.0.0.1:9000 
XDebug: 127.0.0.1:9001 

关闭NetBeans和重新启动服务器,打开Netbeans和按CTRL + F5(运行调试)。

0

这个工作的Ubuntu 16.04,净豆8.2

开放xdebug.ini(对我来说是在/ etc/PHP/PHP {版本}/MODS可用),并把

zend_extension=xdebug.so 
xdebug.remote_enable=1 
xdebug.remote_handler=dbgp 
xdebug.remote_mode=req 
xdebug.remote_port=9000 

净豆 - >工具>选项> PHP>调试

Debugger Port: 9000 
Session ID: netbeans-xdebug 
Maximum Data Length: 2048 

选中这里所有的复选框。

我的配置就像上面提到的那样好,但它没有正常工作,直到我没有选中@Beka提到的所有复选框。