---
title: "vscode c++配置"
author: "Rule"
date: "2020-09-05T08:55:59Z"
tags: []
categories: ["编程语言"]
slug: "vscode-c"
draft: false
lastmod: "2020-09-05T08:55:59Z"
id: 2516622
url: "https://rule.iteye.com/blog/2516622"
---

launch.json

写道

{  
// Use IntelliSense to learn about possible attributes.  
// Hover to view descriptions of existing attributes.  
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387  
"version": "0.2.0",  
"configurations": [  
{  
"name": "C/C++ gdb lanunch",  
"type": "cppdbg",  
"request": "launch",  
"program": "${fileDirname}\\\\${fileBasenameNoExtension}.exe",  
"args": \[],  
"stopAtEntry": false,  
"cwd": "${workspaceFolder}",  
"environment": \[],  
"externalConsole": true,  
"MIMode": "gdb",  
"miDebuggerPath": "D:\\\\mingw64\\\\bin\\\\gdb.exe",  
"preLaunchTask": "g++",  
"setupCommands": [  
{  
"description": "Enable pretty-printing for gdb",  
"text": "-enable-pretty-printing",  
"ignoreFailures": true  
}  
]  
}  
]  
}

 

 

tasks.json

写道

{  
"version": "2.0.0",  
"tasks": [  
{  
"type": "shell",  
"label": "g++",  
"command": "D:\\\\mingw64\\\\bin\\\\g++.exe",  
"args": [  
"-g",  
"${file}",  
"-o",  
"${fileDirname}\\\\${fileBasenameNoExtension}.exe"  
],  
"options": {  
"cwd": "${workspaceFolder}"  
},  
"problemMatcher": [  
"$gcc"  
],  
"group": "build"  
}  
]  
}