현재 main.cc를 빌드하고 디버그

lsh235·2024년 12월 5일
0

CodingTest

목록 보기
26/31

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug main.cc",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/main",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "Build main.cc"
        }
    ]
}

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build main.cc",
            "type": "shell",
            "command": "g++",
            "args": [
                "-g",
                "${fileDirname}/main.cc",
                "-o",
                "${fileDirname}/main"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ],
            "detail": "Generated by user to build main.cc"
        }
    ]
}

0개의 댓글