XDebug could not connect to client(XDebug 无法连接到客户端)
问题描述
我正在尝试在本地使用 NetBeans Mac 进行调试.
I am trying to debug with NetBeans Mac locally.
这是我的 php.ini
This is my php.ini
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_log="/Applications/MAMP/logs/xdebug.log"
xdebug.idekey="netbeans-xdebug"
zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
这是我在 xdebug.log 中得到的
This is what I had been getting in xdebug.log
I: Connecting to configured address/port: localhost:9000.
E: Could not connect to client. :-(
我尝试将端口更改为 9001 并关闭防火墙,但没有帮助.
I try changing the port to 9001 and turn off firewall and it didn't help.
推荐答案
Xdebug 的默认端口 (9000) 与 FastCGI 冲突(Xdebug 是第一个!) - 解决方案是将其更改为另一个端口.完成后,您需要重新启动 IDE,您还需要在其中配置新端口.您还需要重新启动 PHP 和您的 Web 服务器.
Xdebug's default port (9000) conflicts with FastCGI (Xdebug was first!) - the solution is to change it to another port. After having done that, you need to restart your IDE where you will also need to configure the new port. You will also need to restart PHP and your Web Server.
这篇关于XDebug 无法连接到客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:XDebug 无法连接到客户端
基础教程推荐
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- HTTP 与 FTP 上传 2021-01-01