VSCode:Mac(M1)配置VSCode中C/C++环境(只需三步)

只需三步。

1. 下载CodeLLDB插件:

NLP多任务学习

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"
        }
    ]
}

大功告成:

NLP多任务学习
posted @ 2021-12-03 17:07  orion-orion  阅读(1397)  评论(1编辑  收藏  举报