只需三步。
1. 下载CodeLLDB插件:
2. 配置tasks.json
{\"version\": \"2.0.0\",\"tasks\": [{\"label\": \"Build with Clang\",//这个任务的名字在launch.json最后一项配置\"type\": \"shell\",\"command\": \"clang++\",\"args\": [\"-std=c++17\",\"-stdlib=libc++\",\"${fileBasename}\",\"-o\",\"${fileBasenameNoExtension}\",\"--debug\"],\"group\": {\"kind\": \"build\",\"isDefault\": true}}]}
3. 配置launch.json
{\"version\": \"0.2.0\",\"configurations\": [{\"type\": \"lldb\",\"request\": \"launch\",\"name\": \"Debug\",\"program\": \"${workspaceFolder}/${fileBasenameNoExtension}\",\"args\": [],\"cwd\": \"${workspaceFolder}\",\"preLaunchTask\": \"Build with Clang\"}]}
大功告成: