STD :: String显示为<不完整的类型>在调试器中
我想使用VSCODE调试我的项目, 但是,当我调试所有STD ::字符串值时,显示为不完整的类型。在发射中。我有:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Adapter CLI",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-debug/cli/src/adapterCli",
"args": ["${workspaceFolder}/cli/src/config.ini"],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable automatic structuring and indentation for gdb.",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您正在使用
clang
您有2个选项来求解“不完整类型”问题:clang
特定问题,因此,如果您可以使用另一个编译器,则可以只使用GCC
而不是clang
。clang
,但是您必须安装libstdc ++
library的调试信息。安装方法的确切方法取决于您使用的操作系统。对于fedora/redhat/centos使用sudo dnf debuginfo-install libstdc ++ - < some_version_here> .x86_64
,请参阅。对于Ubuntu/debian使用sudo apt-get install libstdc ++ 6-dbgsym
,请参见。clang
与-fno-limit-debug-info
选项,请参阅 https://stackoverflow.com/a/58527425/72178 。Since you are using
clang
you have 2 options to solve "incomplete type" problem:clang
specific problem, so if you can use another compiler you can just usegcc
instead ofclang
.clang
but you will have to install debug info forlibstdc++
library. The exact way how to install it depends on the OS you are using. For Fedora/RedHat/CentOS usesudo dnf debuginfo-install libstdc++-<some_version_here>.x86_64
, see https://stackoverflow.com/a/42031150/72178. For Ubuntu/Debian usesudo apt-get install libstdc++6-dbgsym
, see https://stackoverflow.com/a/65565897/72178.clang
with-fno-limit-debug-info
option, see https://stackoverflow.com/a/58527425/72178.