添加Vscode终端调试

This commit is contained in:
flykhan 2023-03-26 18:09:07 +08:00
parent d327228541
commit 74cfa83754
1 changed files with 29 additions and 1 deletions

30
.vscode/launch.json vendored
View File

@ -28,5 +28,33 @@
}
],
"preLaunchTask": "Compile" // tasks.jsonlabel
}]
},
{
"name": "(gdb) Debug", //
"type": "cppdbg", // cppdbgcpptoolscppdbg
"request": "launch", // launchattach
// "program": "C:\\Windows\\system32\\cmd.exe", // (debug)
"program": "${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe", // (debug)
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", // (Windows'\\')
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe", // (Linux'/')
// "args": ["/C","${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe","&","pause"], //
"args": [], //
"stopAtEntry": false, // truemain
"cwd": "${workspaceFolder}", // ${fileDirname}
"environment": [], //
// "externalConsole": true, // true使cmdIDE1810falseVSC
"externalConsole": false, // true使cmdIDE1810falseVSC
"internalConsoleOptions": "neverOpen", // neverOpengdb
"MIMode": "gdb", // gdblldblldb
"miDebuggerPath": "gdb.exe", // WindowsLinux
"setupCommands": [
{ // STLGoogle
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
],
"preLaunchTask": "Compile" // tasks.jsonlabel
}
]
}