VS CODE/G++配置文件備份
launch.json:
{
? ? // 使用 IntelliSense 了解相關(guān)屬性。
? ? // 懸停以查看現(xiàn)有屬性的
? ? // 欲了解更多信息,請(qǐng)?jiān)L問(wèn): https://go.microsoft.com/fwlink/?linkid=830387
? ? "version": "0.2.0",
? ? "configurations": [
? ? ? ? {
? ? ? ? ? ? "name": "GDB啟動(dòng)",
? ? ? ? ? ? "type": "cppdbg",
? ? ? ? ? ? "request": "launch",
? ? ? ? ? ? "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
? ? ? ? ? ? "args": [],
? ? ? ? ? ? "stopAtEntry": false,
? ? ? ? ? ? "cwd": "${fileDirname}",
? ? ? ? ? ? "environment": [],
? ? ? ? ? ? "externalConsole": true,
? ? ? ? ? ? "MIMode": "gdb",
? ? ? ? ? ? "miDebuggerPath": "D:\\MinGW-w64 TDM-64\\bin\\gdb.exe",
? ? ? ? ? ? "setupCommands": [
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? "description": "為 gdb 啟用整齊打印",
? ? ? ? ? ? ? ? ? ? "text": "-enable-pretty-printing",
? ? ? ? ? ? ? ? ? ? "ignoreFailures": true
? ? ? ? ? ? ? ? },
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? "description": ?"將反匯編風(fēng)格設(shè)置為 Intel",
? ? ? ? ? ? ? ? ? ? "text": "-gdb-set disassembly-flavor intel",
? ? ? ? ? ? ? ? ? ? "ignoreFailures": true
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ],
? ? ? ? ? ? "preLaunchTask": "C/C++: gcc.exe build active file" ?// 調(diào)試前的預(yù)執(zhí)行任務(wù),這里的值是tasks.json文件中對(duì)應(yīng)的編譯任務(wù),也就是調(diào)試前需要先編譯
? ? ? ? ? ?
? ? ? ? }
? ? ]
}
tasks.json:
{
? ? "tasks": [
? ? ? ? {
? ? ? ? ? ? "type": "shell",
? ? ? ? ? ? "label": "C/C++: gcc.exe build active file",
? ? ? ? ? ? "command": "D:/MinGW-w64 TDM-64/bin/g++.exe",
? ? ? ? ? ? "args": [
? ? ? ? ? ? ? ? "-fdiagnostics-color=always",
? ? ? ? ? ? ? ? "-g",
? ? ? ? ? ? ? ? "${file}",
? ? ? ? ? ? ? ? "-o",
? ? ? ? ? ? ? ? "${fileDirname}\\${fileBasenameNoExtension}.exe"
? ? ? ? ? ? ],
? ? ? ? ? ? "options": {
? ? ? ? ? ? ? ? "cwd": "D:/MinGW-w64 TDM-64/bin"
? ? ? ? ? ? },
? ? ? ? ? ? "problemMatcher": [
? ? ? ? ? ? ? ? "$gcc"
? ? ? ? ? ? ],
? ? ? ? ? ? "group": {
? ? ? ? ? ? ? ? "kind": "build",
? ? ? ? ? ? ? ? "isDefault": true
? ? ? ? ? ? },
? ? ? ? ? ? "detail": "調(diào)試器生成的任務(wù)。"
? ? ? ? }
? ? ],
? ? "version": "2.0.0"
}