英文:
Toggle fully qualified Go type names to see variable values in Visual Studio Code
问题
我正在使用 Visual Studio Code 调试 Go 代码,但是我的屏幕不够大。结果是我无法在调试视图中看到任何变量的值,因为类型名称是像 github.com/companyname/project/some/deep/folder/maybe/Variable
这样的东西。有没有一种方法可以缩短这些类型名称?我已经找了一段时间,但没有找到。
英文:
I'm debugging Go code in Visual Studio Code and I don't have a large screen. The result is I can't see any of the variable values in the debug view because the type names are things like github.com/companyname/project/some/deep/folder/maybe/Variable
. Is there a toggle to shorten these? I've looked for a while and can't see any.
答案1
得分: 1
在调试配置中使用“紧凑”视图的变量:
launch.json
"showCompact": true
英文:
Use compact
view of variables in debug configuration:
launch.json
"showCompact": true,
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论