gpt4 book ai didi

php - VSCode 的 Xdebug 在预览中截断长变量

转载 作者:行者123 更新时间:2023-12-04 11:29:10 24 4
gpt4 key购买 nike

当我使用 Xdebug 在 VSCode 中调试变量时,长变量(如 SQL 语句)在预览鼠标悬停或检查面板中被截断。

我怎样才能看到完整的文本?

最佳答案

我有同样的问题(隐藏的子变量,只有 32 个内部变量不可见)。
更新您的启动配置 ( .vscode/launch.json )。套装xdebugSettings :

"xdebugSettings": {
"max_children": 999, // max number of array or object children to initially retrieve.
"max_depth": 10, // maximum depth that the debugger engine may return when sending arrays, hashs or object structures to the IDE.
"max_data": 10240 // max length of a string value of an inspected variable. The default value is 1024. So some values can be clipped.
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/app": "${workspaceFolder}"
},
"xdebugSettings": {
"max_children": 999,
"max_depth": 10,
"max_data": 10240
}
},
]}
查看所有参数: https://github.com/xdebug/vscode-php-debug#supported-launchjson-settings
show_hiddenmax_data为了它。
有时设置中的值太大或没有限制值会使系统减速,然后停止调试。

关于php - VSCode 的 Xdebug 在预览中截断长变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49515059/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com