我有C ++项目和一个具有以下内容的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}/RubeusCore/RubeusCore",
"args": ["-D_DEBUG"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/RubeusCore",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
当我在VSCode中的调试控制台中单击“启动”时,我得到一个/bin/bash
窗口。它会在我的工作区目录中打开,即使我手动启动可执行文件,断点也不会在应有的时候命中。
VSCode会发现此状态,就像它实际上正在运行调试器一样,但我似乎对此没有任何注意。