c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.17763.0",
"compilerPath": "D:/mingw64/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
}
],
"version": 4
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "cppdbg",
"request": "launch",
"program": "E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"internalConsoleOptions": "neverOpen",
"MIMode": "gdb",
"miDebuggerPath": "D:\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build"
}
]
}
settings.json
{
"files.associations": {
"iostream": "cpp",
"xtr1common": "cpp",
"xutility": "cpp",
"vector": "cpp",
"ostream": "cpp",
"xstring": "cpp",
"new": "cpp",
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"unordered_map": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"optional": "cpp",
"regex": "cpp",
"set": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"limits": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"typeinfo": "cpp",
"list": "cpp",
"functional": "cpp",
"numeric": "cpp",
"unordered_set": "cpp",
"chrono": "cpp"
},
"code-runner.executorMap": {
"c": "cd $dir && gcc $fileName -o E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt && E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt",
"cpp":"cd $dir && g++ $fileName -o E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt && E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt"
},
"code-runner.clearPreviousOutput": true,
"editor.fontFamily": "JetBrainsMonoNL NF, Consolas, Consolas, 'Courier New', monospace",
"editor.fontSize": 18
}
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "build",
"command": "g++",
"args": [
"-g",
"${file}",
"-o",
"E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe",
"-static-libgcc",
"-std=c++11"
],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "new"
},
"problemMatcher": "$gcc"
},
{
"label": "run",
"type": "shell",
"dependsOn": "build",
"command": "E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe",
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "new"
}
},
{
"type": "cppbuild",
"label": "C/C++: g++.exe 生成活动文件",
"command": "D:/mingw64/bin/g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "D:/mingw64/bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
]
}