You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.9 KiB
30 lines
1.9 KiB
{
|
|
// 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": "(lldb) Launch", // 配置名称,将会在启动配置的下拉菜单中显示
|
|
"type": "lldb", // 配置类型,不同编程语言不同,该项由CodeLLDB插件提供
|
|
"request": "launch", // 可以为launch(启动)或attach(附加)
|
|
"program": "${command:cmake.launchTargetPath}", // 将要进行调试的程序的路径,这里通过cmake-tools插件自动指定
|
|
"args": [], // 程序调试时传递给程序的命令行参数,一般设为空
|
|
"stopAtEntry": false, // 设为true时程序将暂停在程序入口处,相当于在main上打断点
|
|
"cwd": "${workspaceFolder}", // ${workspaceFolder}调试程序时的工作目录,此为工作区文件夹;改成${fileDirname}可变为文件所在目录
|
|
"environment": [], // 环境变量
|
|
"externalConsole": false, // 使用单独的cmd窗口,与其它IDE一致;为false时使用内置终端
|
|
"internalConsoleOptions": "neverOpen", // 如果不设为neverOpen,调试时会跳到“调试控制台”选项卡,你应该不需要对gdb/lldb手动输命令吧?
|
|
"MIMode": "lldb", // 指定连接的调试器,可以为gdb或lldb,因为使用llvm工具链,所以使用lldb
|
|
"miDebuggerPath": "/usr/bin/lldb", // lldb调试器路径,通过在终端输入 which lldb 命令得到
|
|
"setupCommands": [
|
|
{ // 模板自带,好像可以更好地显示STL容器的内容
|
|
"description": "Enable pretty-printing for lldb",
|
|
"text": "-enable-pretty-printing",
|
|
"ignoreFailures": false
|
|
}
|
|
],
|
|
"preLaunchTask": "taskBuild" // 调试前执行的任务,一般为编译程序。与tasks.json的label相对应,或者是CMake任务,CMake: build
|
|
}
|
|
]
|
|
}
|