C/C++(必备)
C/C++ Compile Run
:相似code Runner
Chinese(simplified) Language
:中文官方插件
Todo Tree
:标记管理TODO的位置和文件c++
Beautify
:代码美化
Material Theme
:主题,我的喜欢material darker high contrast,
(可是注释过浅,可在settings的json文件设置一下字符颜色)json
"editor.tokenColorCustomizations": { "comments": { // 设置字体样式 加粗 下划线 斜体等 "fontStyle": "", // 设置字体颜色 "foreground": "#3887b1"//能够经过前面小方框的颜色直接从拾色器上选 }, // 注释 //将comments修改为其余,类比换其余部分颜色 // "keywords": "#0a0", // 关键字颜色 // "variables": "#f00", // 变量名颜色 // "strings": "#e2d75dbd", // 字符串颜色 // "functions": "#5b99fcc9", // 函数名颜色 // "numbers": "#AE81FF" // 数字颜色
Bracket Pair Colorizer 2
:括号对应函数
launch.json字体
{ "version": "0.2.0", "configurations": [ { "name": "C/C++", "type": "cppdbg", "request": "launch", "program": "${fileDirname}/${fileBasenameNoExtension}.exe", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true, "MIMode": "gdb", "miDebuggerPath": "C:/software/mingw64/mingw64/bin/gdb.exe", "preLaunchTask": "g++", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ], }, ] }
launch.json须要根据本身安装的mingw位置/其余C++IDE(好比codeblocks、devc++)的bin的文件夹位置修改,注意斜杠的方向要作修改ui
{ "version": "2.0.0", "command": "g++", "args": [ "-g", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}.exe" ], "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "${workspaceRoot}" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } }, "group": { "kind": "build", "isDefault": true } }
1.文件名必须符合命名要求,中文,其余字符都会致使找不到文件位置
2.使用vscode打开整个文件夹(包含.vscode)spa