๐ vscode์์ cpp๊ณผ python, java - sprint boot ๊น์ง ๋ชจ๋ ํ๊ธฐ๋๋ฌธ์ ์ค์ ํ ํ๋ฒ ๊ผฌ์ด๋ฉด ์ข ๊ณจ์ด ์ํ๋ค.
๋๋bin bash
๋ก ์ ์์ ์ ํ๊ณ ์๊ธฐ ๋๋ฌธ์ c++ ์ค์ ์ ์กฐ๊ธ ๋ค๋ฅผ ์๊ฐ ์์ด ์ฌ๊ธฐ์ ๋ด ์ค์ ๋ค์ ๊ธฐ๋กํด ๋๋๋ค.
๋๋ Mingw๋ฅผ C:/MinGW/bin/gcc ์ ๊ฐ์ ๊ฒฝ๋ก์ ๋ฐ์์ ์ค์ ํด ๋์๋ค.
c_cpp_properties.json ํ์ผ
{ "configurations": [ { "name": "windows-gcc-x86", "includePath": ["${workspaceFolder}/**"], "compilerPath": "C://MinGW//bin//gcc.exe", "cStandard": "${default}", "cppStandard": "${default}", "intelliSenseMode": "windows-gcc-x86", "compilerArgs": [""], "configurationProvider": "ms-vscode.cmake-tools" } ], "version": 4 }
launch.json ํ์ผ
{ "version": "0.2.0", "configurations": [ { "type": "java", "name": "BoardApplication", "request": "launch", "mainClass": "BoardApplication", "projectName": "hyeongcode_7fef0519" }, { "type": "java", "name": "DemoApplication", "request": "launch", "mainClass": "com.example.demo.DemoApplication", "projectName": "demo", "vmArgs": " -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=51967 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dspring.jmx.enabled=true -Djava.rmi.server.hostname=localhost -Dspring.application.admin.enabled=true -Dspring.boot.project.name=demo" }, { "name": "g++.exe build and debug active file", "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": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }
settings.json ์ code-runner.executorMap ๋ถ๋ถ
"code-runner.executorMap": { "python": "set PYTHONIOENCODING=utf8 && python -u", "javascript": "node", "java": "cd $dir && javac $fileName && java $fileNameWithoutExt", "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "cpp": "chcp.com 65001 && cd $dirWithoutTrailingSlash && g++ $fileName -g -o $fileNameWithoutExt && ./$fileNameWithoutExt.exe",
tasks.json ํ์ผ
{ "version": "2.0.0", "runner": "terminal", "type": "shell", "echoCommand": true, "presentation": { "reveal": "always" }, "tasks": [ { "label": "save and compile for C++", "command": "g++", "args": [ "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": "$gcc" }, { "label": "save and compile for C", "command": "gcc", "args": [ "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}" ], "group": "build", "problemMatcher": "$gcc" }, { "label": "execute", "command": "bash", "group": "test", "args": [ "-c", "\"${fileDirname}/${fileBasenameNoExtension}\"" ] }, { "type": "cppbuild", "label": "C/C++: gcc.exe ํ์ฑ ํ์ผ ๋น๋", "command": "C:/MinGW/bin/gcc.exe", "args": [ "-g", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}.exe" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": "build", "detail": "๋๋ฒ๊ฑฐ์์ ์์ฑ๋ ์์ ์ ๋๋ค." }, { "type": "cppbuild", "label": "C/C++: g++.exe ํ์ฑ ํ์ผ ๋น๋", "command": "C:/MinGW/bin/g++.exe", "args": [ "-g", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}.exe" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": "build", "detail": "๋๋ฒ๊ฑฐ์์ ์์ฑ๋ ์์ ์ ๋๋ค." }, { "type": "cppbuild", "label": "C/C++: gcc.exe ํ์ฑ ํ์ผ ๋น๋", "command": "C:/MinGW/bin/gcc.exe", "args": [ "-g", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}.exe" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": "build", "detail": "์ปดํ์ผ๋ฌ: C:/MinGW/bin/gcc.exe" } ] }