Created
February 14, 2020 03:23
-
-
Save quank123wip/3dc5b138e2d78ec8ed20a55af68d6979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 使用 IntelliSense 了解相关属性。 | |
// 悬停以查看现有属性的描述。 | |
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(gdb) Launch", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${fileDirname}/${fileBasenameNoExtension}.out", //要运行的文件 | |
"args": [], | |
"stopAtEntry": false, | |
"cwd": "${workspaceFolder}", | |
"environment": [], | |
"externalConsole": false, | |
"MIMode": "gdb", | |
"miDebuggerPath": "/usr/bin/gdb", | |
"setupCommands": [ | |
{ | |
"description": "Enable pretty-printing for gdb", | |
"text": "-enable-pretty-printing", | |
"ignoreFailures": true | |
} | |
], | |
"preLaunchTask": "complie" // 调试会话开始前执行的任务,类似于Ant,这里为我们的编译任务 | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "complie", //任务名 | |
"type": "shell", | |
"command": "g++", | |
"args": [ | |
// Ask msbuild to generate full paths for file names. | |
"--std=c++11", | |
"-g", | |
"${fileDirname}/${fileBasename}", | |
"-o2", | |
"-o", | |
"${fileDirname}/${fileBasenameNoExtension}.out" | |
], | |
"presentation": { | |
// Reveal the output only if unrecognized errors occur. | |
"reveal": "silent" | |
}, | |
// Use the standard MS compiler pattern to detect errors, warnings and infos | |
"problemMatcher": "$gcc" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment