Skip to content

Commit 690384d

Browse files
Monty PerrottiMonty Perrotti
authored andcommitted
Fixed launch and tasks.json to build and be able
to run c++ code.
1 parent b3875f8 commit 690384d

File tree

3 files changed

+97
-8
lines changed

3 files changed

+97
-8
lines changed

.vscode/launch.json

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,26 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
{
8-
"name": "Python: Current File",
9-
"type": "python",
10-
"request": "launch",
11-
"program": "${file}",
12-
"console": "integratedTerminal"
13-
}
7+
{
8+
"name": "g++.exe - Build and debug active file",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}\\bin\\${relativeFileDirname}\\${fileBasenameNoExtension}.exe",
12+
"args": [],
13+
"stopAtEntry": true,
14+
"cwd": "${workspaceFolder}",
15+
"environment": [],
16+
"externalConsole": false,
17+
"MIMode": "gdb",
18+
"miDebuggerPath": "gdb.exe",
19+
"setupCommands": [
20+
{
21+
"description": "Enable pretty-printing for gdb",
22+
"text": "-enable-pretty-printing",
23+
"ignoreFailures": true
24+
}
25+
],
26+
"preLaunchTask": "C/C++: g++.exe build active file"
27+
}
1428
]
1529
}

.vscode/settings.json

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
11
{
2-
"python.pythonPath": "C:\\Users\\Perrmon13\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe"
2+
"python.pythonPath": "C:\\Users\\Perrmon13\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe",
3+
"files.associations": {
4+
"array": "cpp",
5+
"atomic": "cpp",
6+
"bit": "cpp",
7+
"*.tcc": "cpp",
8+
"cctype": "cpp",
9+
"clocale": "cpp",
10+
"cmath": "cpp",
11+
"cstdarg": "cpp",
12+
"cstddef": "cpp",
13+
"cstdint": "cpp",
14+
"cstdio": "cpp",
15+
"cstdlib": "cpp",
16+
"cwchar": "cpp",
17+
"cwctype": "cpp",
18+
"deque": "cpp",
19+
"unordered_map": "cpp",
20+
"vector": "cpp",
21+
"exception": "cpp",
22+
"algorithm": "cpp",
23+
"functional": "cpp",
24+
"iterator": "cpp",
25+
"memory": "cpp",
26+
"memory_resource": "cpp",
27+
"numeric": "cpp",
28+
"optional": "cpp",
29+
"random": "cpp",
30+
"string": "cpp",
31+
"string_view": "cpp",
32+
"system_error": "cpp",
33+
"tuple": "cpp",
34+
"type_traits": "cpp",
35+
"utility": "cpp",
36+
"fstream": "cpp",
37+
"initializer_list": "cpp",
38+
"iosfwd": "cpp",
39+
"iostream": "cpp",
40+
"istream": "cpp",
41+
"limits": "cpp",
42+
"new": "cpp",
43+
"ostream": "cpp",
44+
"sstream": "cpp",
45+
"stdexcept": "cpp",
46+
"streambuf": "cpp",
47+
"typeinfo": "cpp"
48+
}
349
}

.vscode/tasks.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "C/C++: g++.exe build active file", // This compiles the cpp file
8+
"type": "shell",
9+
"command": "g++",
10+
"args": [
11+
// Name of cpp file to be compiled.
12+
"${relativeFile}",
13+
"-o",
14+
// Name of original file without its extention
15+
"${workspaceFolder}\\bin\\${relativeFileDirname}\\${fileBasenameNoExtension}.exe"
16+
],
17+
"group": {
18+
"isDefault": true,
19+
"kind": "build"
20+
},
21+
"presentation": {
22+
// Reveal the output only if unrecognized errors occur.
23+
"reveal": "silent"
24+
},
25+
// Use the standard MS compiler pattern to detect errors, warnings and infos
26+
"problemMatcher": "$msCompile"
27+
}
28+
]
29+
}

0 commit comments

Comments
 (0)