vsCode调试功能

This commit is contained in:
iridiumR 2021-10-21 20:58:58 +08:00
parent 978af22a7a
commit 3783c65a76
4 changed files with 11 additions and 55 deletions

View File

@ -13,7 +13,7 @@
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:/Project/mingw64/bin/gcc.exe",
"compilerPath": "C:/Project/mingw64/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-gcc-x64"

6
.vscode/launch.json vendored
View File

@ -3,9 +3,11 @@
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"label": "Compile",
"configurations": [
{
"name": "gcc.exe",
"name": "g++.exe",
"label": "Compile",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
@ -23,7 +25,7 @@
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc.exe 生成活动文件"
"preLaunchTask": "Compile"
}
]
}

31
.vscode/tasks.json vendored
View File

@ -2,12 +2,14 @@
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 生成活动文件",
"command": "C:/Project/mingw64/bin/gcc.exe",
"label": "Compile",
"command": "C:/Project/mingw64/bin/g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"-fexec-charset=GB2312",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
@ -16,31 +18,8 @@
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
},
{
"type": "cppbuild",
"label": "C/C++: g++.exe 生成活动文件",
"command": "C:\\Project\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "编译器: C:\\Project\\mingw64\\bin\\g++.exe"
"detail": "编译器: C:/Project/mingw64/bin/g++.exe"
}
],
"version": "2.0.0"

View File

@ -12,30 +12,5 @@
},
"files.encoding": "gb2312"
},
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "gcc.exe - 生成和调试活动文件",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "C:/Project/mingw64/bin",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Project\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc.exe 生成活动文件"
}
]
}
}