netbeans 中的 xdebug 不会绑定到端口 9000

发布于 2024-09-05 16:09:15 字数 388 浏览 2 评论 0原文

我一直在尝试配置 xdebug 与 netbeans 一起工作,我当前的配置是

[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 博客提供的测试,解释了如何测试配置在绑定时是否有效,它只是输出“无法绑定”

有什么建议吗?

I've been trying to configure xdebug to work along with netbeans, my current configuration is

[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"

I tried the test provided by a netbeans blog explaining how to test if the configuration works when binding it just outputs "unable to bind"

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

调妓 2024-09-12 16:09:16

有几件事超出了我的想象...

首先,检查是否没有其他东西正在侦听端口 9000(在命令行上输入 netstat -an )。

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

A couple of things off the top of my head...

Firstly, check that nothing else is already listening to port 9000 (on the command line, type netstat -an ).

If that doesn't show anything, make sure the Windows Firewall is not enabled.

秋日私语 2024-09-12 16:09:16

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

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-port) 和 httpd(apache-port) 中定义的端口匹配。

Server: 127.0.0.1:9000
XDebug: 127.0.0.1:9001

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

This was my Solution for the same issue.

The Configuration of xdebug in the php.ini is minimalized.

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

Right click Project > Run configuration:

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

Tools > Options > PHP > Debugging

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

The Debugger Port has to be another than the Server Port. The Ports defined in netbeans have to match the one defined in php.ini(xdebug-port) and httpd(apache-port)

Server: 127.0.0.1:9000
XDebug: 127.0.0.1:9001

Close netbeans and restart the server, open Netbeans and press CTRL+F5 (Run Debug).

几度春秋 2024-09-12 16:09:16

这适用于 Ubuntu 16.04,Net beans 8.2

打开 xdebug.ini (对我来说它位于 /etc/php/{php-version}/mods-available 中)并将

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

Net beans ->工具>选项> PHP>调试

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

取消选中此处的所有复选框。

如上所述,我的配置很好,但直到我取消选中@Beka 提到的所有复选框后,它才正常工作。

This worked For Ubuntu 16.04, Net beans 8.2

open xdebug.ini (for me it was in /etc/php/{php-version}/mods-available) and put

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

Net beans -> Tools > Options > PHP > Debugging

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

unchecked all Check-boxes here.

My configs were just fine as mentioned above but it wasn't working fine until i unchecked all check-boxes as mentioned by @Beka.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文