본문 바로가기
C++

Visual Code 환경 설정

by _은하별사탕_ 2020. 5. 21.

한달전쯤,,,

C++ 연습을 위해 Visual Studio를 설치할까 했지만 용량도 너무 크고 번거롭기에 Visual Code를 설치하기로 했다

일부 파일 설정에서 헤맸던거 알고보니 Document 페이지에서 그대로 가져오면 되는 설정들이라 허무했던 기억이다

(단순 코드 실행이라면 Extension에서 Code Runner 설치하면 되지만 가끔은 디버깅도 해야할 필요가 있고!!)

조만간 노트북 밀을 예정인데 다시 설치하게 되면 이미지 첨부해서 글 업뎃할 예정이다

 

 

-launch.json-

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "g++.exe build and debug active file",
        "type": "cppdbg",
        "request": "launch",
        "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
        "args": [],
        "stopAtEntry": true,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "C:\\Program Files (x86)\\mingw-w64\\i686-8.1.0-posix-dwarf-rt_v6-rev0\\mingw32\\bin\\gdb.exe",
        "setupCommands": [
          {
            "description": "Enable pretty-printing for gdb",
            "text": "-enable-pretty-printing",
            "ignoreFailures": true
          }
        ],
        "preLaunchTask": "g++.exe build active file"
      }
    ]
  }

 

 

-tasks.json-

{
	"version": "2.0.0",
	"tasks": [
	  {
		"type": "shell",
		"label": "g++.exe build active file",
		"command": "C:\\Program Files (x86)\\mingw-w64\\i686-8.1.0-posix-dwarf-rt_v6-rev0\\mingw32\\bin\\g++.exe",
		"args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"],
		"options": {
		  "cwd": "C:\\Program Files (x86)\\mingw-w64\\i686-8.1.0-posix-dwarf-rt_v6-rev0\\mingw32\\bin"
		},
		"problemMatcher": ["$gcc"],
		"group": {
		  "kind": "build",
		  "isDefault": true
		}
	  }
	]
  }

'C++' 카테고리의 다른 글

VSCode 파일 소스을(를) 열 수 없습니다.  (2) 2020.05.28
반복문에서의 Vector 요소 삭제  (0) 2020.05.22