【发布时间】:2019-03-03 13:23:25
【问题描述】:
我已经找到了几种使用 GCC 编译器调试 C 的不同方法,但是我希望在默认情况下进行调试。有什么方法可以通过我在 VSCode 中的 launch.json 中的设置来做到这一点?
这是我的launch.json:
{
// 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) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
【问题讨论】:
标签: c gcc visual-studio-code