디버그 시 scanf 를 입력 못하는 오류를 해결하는 방법입니다.

https://youtu.be/Tn8aKPJMSlA

아래 내용을 참고하여 글을 작성하였습니다.

https://csdiary.tistory.com/2

익스텐션 설치

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/84d4e461-148c-4c2e-81ac-22d59e177479/Untitled.png

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "shell",
            "label": "C bulid for clang",
            "command": "clang",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "${workspaceRoot}"
            },
            "presentation": {
                "clear": true
            },
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": []
        },
        {
            "type": "shell",
            "label": "C++ bulid for clang++",
            "command": "clang++",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "${workspaceRoot}"
            },
            "presentation": {
                "clear": true
            },
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": []
        },
        {
            "type": "shell",
            "label": "execute",
            "command": "${fileDirname}/${fileBasenameNoExtension}",
            "group": "test",
            "presentation": {
                "clear": true
            }
        }
    ]
}

launch.json

{
    "version": "0.2.0",
    "configurations": [

        {
            "type": "lldb",
            "request": "launch",
            "name": "Lldb debug",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "cwd": "${workspaceRoot}"
        }
    ]
}