【发布时间】:2020-09-20 10:37:43
【问题描述】:
我主要使用 gdb 来调试 vscode 中的 c++ 单个文件,但现在想尝试 lldb,但在为 vscode 设置它时遇到了问题。
我首先创建默认的launch.json表单调试选项卡,选择cpp gdb/lldb,然后选择clang++进行配置。
调试开始时..它显示以下错误:
然后在launch.json中我将miDebuggerPath路径形式/usr/bin/lldb-mi更改为/usr/bin/lldb。
然后,当我启动调试器时,它什么也不做,只是在终端的顶部和以下几行中调试控件:
warning: ignoring unknown option: --interpreter=mi
warning: ignoring unknown option: --tty=/dev/pts/1
我在这里缺少什么?
我的整个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": "clang++ - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: clang++ build active file",
"miDebuggerPath": "/usr/bin/lldb"
}
]
}
【问题讨论】:
标签: c++ visual-studio-code vscode-debugger