디버그 시 scanf 를 입력 못하는 오류를 해결하는 방법입니다.
아래 내용을 참고하여 글을 작성하였습니다.
익스텐션 설치
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}"
}
]
}