将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'
我仍然不知道如何修复它......
答案 0 :(得分:0)
更改max_depth参数后,我在xdebug客户端遇到了同样的错误。我不得不将max_depth重置为1以使xdebug再次工作。