Vscode使用教程

1.安装编译器

https://sourceforge.net/projects/mingw-w64/

下载x86_64-win32-seh

解压缩放到非中文路径下,然后并把mingw64\bin添加到系统环境变量Path中

2.task.json

终端 -> 配置默认生成任务 -> C/C++: g++.exe 生成活动文件

cpp 复制代码
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "type": "cppbuild",
            "label": "build",
            "command": "D:\\software\\mingw64\\bin\\g++.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "test.cpp",
                "-o",
                "test.out"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "编译器: D:\\software\\mingw64\\bin\\g++.exe"
        }
    ]
}

3.launch.json

运行 -> 添加配置 -> (gdb) 启动

{

// 使用 IntelliSense 了解相关属性。

// 悬停以查看现有属性的描述。

// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",

"configurations": [

复制代码
    {
        "name": "(gdb) 启动",
        "type": "cppdbg",
        "request": "launch",
        "program": "${fileDirname}//test.out",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${fileDirname}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "gdb",
        "preLaunchTask":"build"
    }
]

}

4.插件

Resource Monitor, 监控内存,磁盘信息

GitLens

相关推荐
OsDepK9 小时前
xcode应用构建至testflight测试流程
ide·macos·xcode
frjc10 小时前
如何在 IDEA 中打开并运行已有Java项目
java·ide·intellij-idea
晚风叙码15 小时前
Linux(三)apt/yum 软件安装与 vim 编辑器入门指南
linux·编辑器·vim
民乐团扒谱机15 小时前
【超详细】PyQt6 实现 AU 风格波形图编辑器:多级缩放与采样点逐级渲染,附全过程代码
开发语言·python·编辑器·pyqt·audition·时域·频谱图
CounterGlew51116 小时前
Vscode通过ssh链接autodl云服务器并配置codex
运维·服务器·vscode
女神下凡17 小时前
PyCharm 2026破解激活
ide·python·pycharm
谁刺我心17 小时前
【vscode问题】远程remote cpptools导致linux板子cpu爆炸问题
ide·vscode·编辑器
LaughingZhu1 天前
Product Hunt 每日热榜 | 2026-09-02
java·ide·intellij-idea
进击的蜗牛Eric1 天前
VSCode Server手动安装指南(简洁版)
vscode
小芒果_012 天前
从0到1,将pycharm上的项目上传到github
ide·pycharm·github