【发布时间】:2020-07-26 06:24:49
【问题描述】:
我刚刚将 VSCode 设置为使用运行 Gentoo x64 的远程 SSH 在家工作。除了我们通常使用的 GCC 调试器之外,一切正常。它在标题中引发了我的错误。
这是我的launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "gcc - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "gcc build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
还有我的tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: gcc build active file",
"command": "/usr/bin/gcc",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
}
是的,我确实使用-g 标志进行编译。有关如何解决此问题的任何想法?
【问题讨论】:
标签: c linux debugging gcc visual-studio-code