반응형
맥에서 코딩하기 위해, Visual Studio Code를 세팅해보았다.
https://ldgeao99.tistory.com/203 이 링크가 가장 도움이 됐지만 일부 세팅은 다시 해줘야 했다(디버깅용 -g 옵션, a.out 등)
tasks.jon과 launch.json이 필요한데.. 현재 내 설정 공개한다.
tasks.jon
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{
"version": "2.0.0",
"runner": "terminal",
"type": "shell",
"echoCommand": true,
"presentation" : { "reveal": "always" },
"tasks": [
//C++ 컴파일
{
"label": "C++빌드하자",
"command": "g++",
"args": [
"-g",
"-std=c++11",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"group": "build",
//컴파일시 에러를 편집기에 반영
//참고: https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher
"problemMatcher": {
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
// The regular expression.
//Example to match: helloWorld.c:5:3: warning: implicit declaration of function 'prinft'
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "실행",
"command": "cd ${fileDirname} && ./${fileBasenameNoExtension}",
"group": "test"
}
]
}
|
cs |
launch.jon
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
{
// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
// 기존 특성에 대한 설명을 보려면 가리킵니다.
// 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) 연결",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/a.out",
"processId": "${command:pickProcess}",
"MIMode": "lldb"
},
{
"name": "(lldb) 시작",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb"
}
]
}
|
cs |
반응형
'Programming > Problem Solving' 카테고리의 다른 글
| 인접행렬, 인접리스트 (1) | 2020.04.09 |
|---|---|
| [코뽕] AtCoder Beginner Contest 161 - D Lunlun Number (0) | 2020.04.05 |
| 코드포스 C++ 헬퍼(VsCaide) (0) | 2020.04.02 |
| C++ bigint class (1) | 2020.03.30 |
| 백준 9663번 N-Queen (0) | 2020.03.15 |
