【发布时间】:2018-07-22 01:16:40
【问题描述】:
当我通过终端和 gdb 调试我的应用程序时,一切都按预期工作,但是如果我尝试使用 gdb 作为 vs 代码的调试器,它会立即存在并输出:
Breakpoint 1, main (argc=1, argv=0x7fffffffe638) at /home/kronos/Desktop/voxel-world/source/main.cpp:60
60 {
[Inferior 1 (process 7771) exited with code 01]
The program '/home/kronos/Desktop/voxel-world/build/voxel-world' has exited with code 1 (0x00000001).
这是我的配置文件:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/voxel-world",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
【问题讨论】:
标签: debugging visual-studio-code editor