【问题标题】:xDebug issue after upgrade php5.5.x to php5.6将 php5.5.x 升级到 php5.6 后的 xDebug 问题
【发布时间】:2016-03-16 16:13:58
【问题描述】:

在将 php 5.5.x 升级到 5.6.0 后,我遇到了 xdebug + sublime text 3 问题

错误:

Please restart Xdebug debugging session.
Disconnected from Xdebug debugger engine.
'utf-8' codec can't decode byte 0xe2 in position 1023: unexpected end of data

这是我的php -v 输出:

PHP 5.6.19-1+deb.sury.org~trusty+1 (cli)  Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.4.1-dev, Copyright (c) 2002-2016, by Derick Rethans

有我的/etc/php5/apache2/php.ini(只有xdebug配置):

[xdebug]
zend_extension = /usr/lib/php5/20131226/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_connect_back = 1
display_errors = On
html_errors = On

pd: 我的 xdebug.sublime-settings - 用户 是:

{
    "max_depth": 5
}

这个问题不常见,有时可以正常工作

更新

我在我的 xdebug 客户端中将 true 设置为 "debug" 变量...

// Show detailed log information about communication
// between debugger engine and Sublime Text.
// Log can be found at Packages/User/Xdebug.log
"debug": true

检查 Xdebug.log:

[03/16/2016 08:24:30PM] DEBUG - [Send command] context_get -i 18
[03/16/2016 08:27:08PM] INFO - Connection lost with debugger engine.
[03/16/2016 08:27:08PM] DEBUG - 'utf-8' codec can't decode byte 0xc3 in position 1023: unexpected end of data
[03/16/2016 08:27:09PM] DEBUG - [Send command] stack_get -i 19
[03/16/2016 08:27:09PM] INFO - Connection lost with debugger engine.
[03/16/2016 08:27:09PM] DEBUG - 'NoneType' object has no attribute 'send'

我仍然不知道如何解决它......

【问题讨论】:

  • 尝试使用 xdebug var localhost/project/index.php?XDEBUG_SESSION_START=1
  • 它不起作用:/
  • 我建议您创建一个“远程调试日志”,如xdebug.org/support.php#remote 所述,并在此处附加初始通信作为您帖子的编辑。该日志将显示 Sublime 和 Xdebug 之间的所有通信。我认为有一个 Xdebug 错误是因为 [03/16/2016 08:27:09PM] INFO - Connection lost with debugger engine. 而不是因为“解码”问题,所以您可能需要遵循 xdebug.org/support.php#remote 的所有说明并在 bugs.xdebug.org 提交错误报告
  • 我安装的 netbeans 运行良好... Sublime 做错了什么? sublime 还有另一个 xdebug 客户端?我正在使用包'xdebug client'。提前谢谢你

标签: php sublimetext3 sublimetext xdebug php-5.6


【解决方案1】:

更改 max_depth 参数后,我在 xdebug 客户端遇到了同样的错误。我不得不将 max_depth 重置为 1 以使 xdebug 再次工作。

【讨论】:

    猜你喜欢
    • 2019-11-10
    • 2020-06-24
    • 2013-09-07
    • 2016-02-29
    • 1970-01-01
    • 2014-11-26
    • 1970-01-01
    • 2011-10-13
    • 1970-01-01
    相关资源
    最近更新 更多