@takane takane / tasks.json
Created at Thu Jan 15 12:20:53 JST 2026
macOSのVSCode用
launch.json
Raw
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug (Clang/LLDB)",
      "type": "cppdbg",
      "request": "launch",
      "program": "${fileDirname}/${fileBasenameNoExtension}",
      "args": [],
      "cwd": "${fileDirname}",
      "externalConsole": true,
      "osx": {
        "MIMode": "lldb"
      },
      "setupCommands": [
        {
          "description": "Set charset to UTF-8 for LLDB",
          "text": "-exec set charset UTF-8",
          "ignoreFailures": true
        }
      ],
      "preLaunchTask": "C/C++: clang アクティブなファイルのビルド"
    }
  ]
}
tasks.json
Raw
{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: clang アクティブなファイルのビルド",
            "command": "/usr/bin/clang",
            "args": [
                "-fcolor-diagnostics",
                "-fansi-escape-codes",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "デバッガーによって生成されたタスク。"
        }
    ],
    "version": "2.0.0"
}