vscode下搭建C/C++环境 mingw64安装 可以到 官网 下载 mingw-w64-install.exe 用来引导安装,也可以直接下载压缩包。按照提示安装即可。 插件安装 C/C++ Code Runner launch.json文件配置 { "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "preLaunchTask": "build", "type": "cppdbg", "request": "launch", "program": "${fileDirname}/${fileBasenameNoExtension}.exe", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true, "MIMode": "gdb", "miDebuggerPath": "C:\\mingw64\\bin\\gdb.exe", // GDB的路径,注意替换成自己的路径 "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable