如题,怎么修改 vscode 中创建配置时 launch.json 中的内容?即我想创建自己的配置内容作为下次内容生成模板,而不是每次都自定义修改。
launch.json
{
"name": "G++ Debug",
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "g++dbbuild",
"program": "${fileDirname}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
task.json
{
"label": "g++dbbuild",
"type": "shell",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"command": g++.exe",
"args": [
"${file}",
"-g",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.exe",
"-Wall"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}