반응형

I C언어 시작하기

비주얼 스튜디오 코드 (Visual Studio Code / vscode) - .vscode 파일

 

2020.09.20 c언어 컴파일, 디버깅, 터미널 입력, 설정

settings.json, tasks.json, launch.json, c_cpp_properties.json

 

 

1. settings.json

 

{
    "editor.suggestSelection""first",
    "vsintellicode.modify.editor.suggestSelection""automaticallyOverrodeDefaultValue",
    "window.newWindowDimensions""inherit",
    "editor.renderWhitespace""none",
    "editor.renderControlCharacters"false,
    "C_Cpp.updateChannel""Insiders",
    "workbench.colorTheme""Atom Pro Theme",
    "C_Cpp.default.compilerPath""C:\\MinGW\\bin\\gcc.exe",
    "miDebuggerPath""C:\\MinGW\\bin\\g++.exe",
    "code-runner.runInTerminal"true,
    "files.associations": {
        "random""c",
        "algorithm""c",
        "array""c",
        "atomic""c",
        "*.tcc""c",
        "cctype""c",
        "cerrno""c",
        "climits""c",
        "clocale""c",
        "cmath""c",
        "cstdarg""c",
        "cstddef""c",
        "cstdint""c",
        "cstdio""c",
        "cstdlib""c",
        "cwchar""c",
        "cwctype""c",
        "deque""c",
        "string""c",
        "unordered_map""c",
        "vector""c",
        "exception""c",
        "functional""c",
        "iterator""c",
        "memory""c",
        "memory_resource""c",
        "numeric""c",
        "system_error""c",
        "tuple""c",
        "type_traits""c",
        "utility""c",
        "fstream""c",
        "initializer_list""c",
        "ios""c",
        "iosfwd""c",
        "istream""c",
        "limits""c",
        "new""c",
        "ostream""c",
        "queue""c",
        "sstream""c",
        "stdexcept""c",
        "streambuf""c",
        "cstdbool""c",
        "typeinfo""c"
    }
}
 

 

 

2. tasks.json

 

{
    "version""2.0.0",
    "tasks": [
        {
            "type""shell",
            "label""C/C++: g++.exe build active file",
            "command""C:\\MinGW\\bin\\gcc.exe",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd""${workspaceFolder}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind""build",
                "isDefault"true
            }
        }
    ]
}
 

 

 

3. launch.json

 

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version""0.2.0",
    "configurations": [
        {
            "name""gcc.exe - 활성 파일 빌드 및 디버그",
            "type""cppdbg",
            "request""launch",
            "program""${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry"false,
            "cwd""${workspaceFolder}",
            "environment": [],
            "externalConsole"false,
            "MIMode""gdb",
            "miDebuggerPath""C:\\MinGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description""gdb에 자동 서식 지정 사용",
                    "text""-enable-pretty-printing",
                    "ignoreFailures"true
                }
            ],
            "preLaunchTask""C/C++: g++.exe build active file"
        }
    ]
}
 

 

 

4. c_cpp_properties.json

 

{
    "configurations": [
        {
            "name""Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "cStandard""gnu11",
            "cppStandard""gnu++14",
            "intelliSenseMode""gcc-x86"
        }
    ],
    "version"4
}
 

 

 

반응형