[VS Code] 配置文件

1. settings.json

路径:C:UsersAdministratorAppDataRoamingCodeUsersettings.json
{
    "workbench.iconTheme": "vscode-icons",
    "vsicons.dontShowNewVersionMessage": true,
    "editor.fontSize": 15,
    "editor.fontFamily": "JetBrains Mono, 'Courier New', monospace",
    "files.autoSave": "afterDelay",
    "terminal.integrated.shell.windows": "D:\app\Git\bin\bash.exe"
}

2. launch.json

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "gcc.exe - 生成和调试活动文件",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/cdemo.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "D:\path\MinGW\bin",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "D:\path\MinGW\bin\gdb.exe",
            "setupCommands": [
                {
                    "description": "为 gdb 启用整齐打印",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "Build"
        }
    ]
}

3. task.json

{
    "version": "2.0.0",
    "options": {
        "cwd": "${workspaceFolder}/build"
    },
    "tasks": [
        {
            "type": "shell",
            "label": "cmake",
            "command": "cmake",
            "args": [
                ".."
            ]
        },
        {
            "label": "make",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "command": "make",
            "args": []
        },
        {
            "label": "Build",
            "dependsOn": [
                "cmake",
                "make"
            ]
        }
    ],
} 
原文地址:https://www.cnblogs.com/oxygenG/p/14220539.html