0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 17:36:27 +00:00

[Add] Debug (Windows)

This commit is contained in:
Baoshuo Ren 2020-09-26 19:38:38 +08:00 committed by Baoshuo Ren
parent 64aa29fd27
commit 1886b86fde
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68
2 changed files with 77 additions and 0 deletions

30
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,30 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDB)",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-win32-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe build active file"
}
]
}

47
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,47 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
// ggc -g ${file} -o ${fileDirname}${fileBasenameNoExtension}.exe
"windows": {
"command": "g++",
"args": [
"-g",
"\"${file}\"",
"-o",
"\"${fileDirname}\\${fileBasenameNoExtension}.exe\"",
"--save-temps"
]
},
//
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"." // ${workspaceFolder}
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"group": {
"kind": "build",
"isDefault": true
},
//
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared" // shared=new=
}
}
]
}