简体   繁体   English

Xdebug 无法连接到调试客户端。 试过:本地主机:9000

[英]Xdebug Could not connect to debugging client. Tried: localhost:9000

I used before Xdebug v2, but after last update I faced with Xdebug v3.0.0, I replaced all what needed by the update user guide我在 Xdebug v2 之前使用过,但在上次更新后我遇到了 Xdebug v3.0.0,我替换了更新用户指南所需的所有内容

I'm using Docker.我正在使用 Docker。

my debug conf我的调试配置

#xdebug.remote_enable=true
xdebug.mode=debug

#xdebug.remote_port=9000
xdebug.client_port=9000

xdebug.remote_host=172.17.0.1

xdebug.remote_handler=dbgp

#xdebug.remote_autostart=1
xdebug.start_with_request=yes

#xdebug.remote_connect_back=0
xdebug.discover_client_host=0

xdebug.idekey=PHPSTORM
xdebug.show_error_trace = 1
xdebug.max_nesting_level=250
xdebug.var_display_max_depth=10
#xdebug.remote_mode=req

xdebug.remote_log=/var/log/r_xdebug.log
xdebug.log=/var/log/xdebug.log

and what I get in log when try to execute any PHP script:以及尝试执行任何 PHP 脚本时我在日志中得到的内容:

tail -f /var/log/xdebug.log
[888] Log opened at 2020-11-29 10:39:51.670762
[888] [Step Debug] INFO: Connecting to configured address/port: localhost:9000.
[888] [Step Debug] WARN: Creating socket for 'localhost:9000', poll success, but error: Operation now in progress (29).
[888] [Step Debug] WARN: Creating socket for 'localhost:9000', connect: Cannot assign requested address.
[888] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(
[888] Log closed at 2020-11-29 10:39:57.515970

When I try to execute the URL in a browser PhpStorm does not start debugger, but I checked当我尝试在浏览器中执行 URL 时,PhpStorm 没有启动调试器,但我检查了

lsof -i :9000 | grep LISTEN

listen port appeared when I click listening in PhpStorm.当我在 PhpStorm 中单击监听时出现监听端口。 My conf was sync File | Settings | Languages & Frameworks | PHP | Debug我的 conf 是同步File | Settings | Languages & Frameworks | PHP | Debug File | Settings | Languages & Frameworks | PHP | Debug File | Settings | Languages & Frameworks | PHP | Debug -> Debug port 9000 File | Settings | Languages & Frameworks | PHP | Debug -> 调试端口 9000

What's wrong with my Xdebug config and what I need to do?我的 Xdebug 配置有什么问题以及我需要做什么?

I just want to share how I migrated from 2.x to 3.x我只想分享我是如何从 2.x 迁移到 3.x

;Xdebug 2.X
;xdebug.remote_enable=true
;xdebug.remote_port=9000
;xdebug.remote_host=172.17.0.1
;
;xdebug.remote_autostart=1
;xdebug.remote_connect_back=0
;xdebug.idekey=PHPSTORM
;xdebug.show_error_trace = 1
;xdebug.max_nesting_level=250
;xdebug.var_display_max_depth=10
;xdebug.remote_mode=req


;Xdebug 3.X
xdebug.mode=debug
xdebug.client_port=9000
xdebug.client_host=172.17.0.1
xdebug.remote_handler=dbgp
xdebug.start_with_request=yes
xdebug.discover_client_host=0
xdebug.idekey=PHPSTORM
xdebug.show_error_trace = 1
xdebug.max_nesting_level=250
xdebug.var_display_max_depth=10
xdebug.log=/var/log/xdebug.log

Please, update your xdebug file to:请将您的xdebug文件更新为:

xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=1

I found that using我发现使用

xdebug.log_level=0

stopped the excess logs.停止了多余的日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xdebug:[Step Debug] 无法连接到调试客户端。 试过:localhost:9003(通过 xdebug.client_host/xdebug.client_port 回退):-( - Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-( Xdebug: [Step Debug] 无法连接到调试客户端 - Xdebug: [Step Debug] Could not connect to debugging client XDebug 无法连接到客户端 - XDebug could not connect to client Xdebug: [Step Debug] 连接调试客户端超时,等待:200 ms。 试过:本地主机:9003 - Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9003 Docker + Xdebug + VSCode 无法连接到客户端 - Docker + Xdebug + VSCode Could not connect to client Xdebug 3 无法从 Docker [20.10.12] 连接到 PhpStorm 调试客户端。 Ubuntu - Xdebug 3 couldn't connect from Docker [20.10.12] to PhpStorm debug client. Ubuntu Xdebug 无法连接到客户端,从哪里开始调试调试器? - Xdebug unable to connect to client, where do I start debugging the debugger? Xdebug 甚至不尝试连接到端口 9000 - Xdebug doesn't even try to connect to port 9000 PHP SOAP客户端。 HTTPS无法连接 - PHP SOAP Client. HTTPS cannot connect PHP远程调试:XDebug无法连接到JetBrains的php Storm客户端 - PHP remote debugging: XDebug can't connect to JetBrains php Storm client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM