netbeans 中的 xdebug 不会绑定到端口 9000
我一直在尝试配置 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有几件事超出了我的想象...
首先,检查是否没有其他东西正在侦听端口 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.
这是我对同一问题的解决方案。
php.ini 中 xdebug 的配置被最小化。
php.ini:
右键单击项目>运行配置:
工具>选项> PHP>调试
调试器端口必须与服务器端口不同。 Netbeans 中定义的端口必须与 php.ini(xdebug-port) 和 httpd(apache-port) 中定义的端口匹配。
关闭 netbeans 并重新启动服务器,打开 Netbeans 并按 CTRL+F5(运行调试)。
This was my Solution for the same issue.
The Configuration of xdebug in the php.ini is minimalized.
php.ini:
Right click Project > Run configuration:
Tools > Options > PHP > Debugging
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)
Close netbeans and restart the server, open Netbeans and press CTRL+F5 (Run Debug).
这适用于 Ubuntu 16.04,Net beans 8.2
打开 xdebug.ini (对我来说它位于 /etc/php/{php-version}/mods-available 中)并将
Net beans ->工具>选项> PHP>调试
取消选中此处的所有复选框。
如上所述,我的配置很好,但直到我取消选中@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
Net beans -> Tools > Options > PHP > Debugging
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.