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

相关推荐
慕言手记14 小时前
IDEA 插件常用-2026版
java·ide·spring boot·intellij-idea·idea·intellij idea
nuoyigui988914 小时前
向日葵远程无人值守,验证码不变
编辑器
我命由我1234515 小时前
Visual Studio - Visual Studio 注释快捷键
java·c语言·开发语言·c++·ide·java-ee·visual studio
码农小旋风15 小时前
Codex 直接住进 JetBrains IDE 里:AI Agent 正在接管熟悉的开发入口
ide·人工智能
lifewange17 小时前
Vim 统一替换(全局替换)
linux·编辑器·vim
Cloud_Shy61817 小时前
Python 数据分析基础入门:《Excel Python:飞速搞定数据分析与处理》学习笔记系列(第十章 Python 驱动的 Excel 工具 上篇)
vscode·python·数据分析·excel·pandas
萤萤七悬18 小时前
【AI帮玩游戏】一、搭建Claude+vscode环境,先看看异环ok-nte项目
人工智能·vscode·玩游戏
薛定猫AI21 小时前
【深度解析】从 Antigravity 更新看 Agent IDE 的工程化演进:权限、沙盒、MCP 与模型治理
前端·javascript·ide
郝学胜-神的一滴1 天前
Qt 高级开发 005: Qt Creator与Visual Studio 项目双向转换
开发语言·c++·ide·qt·程序人生·visual studio
irpywp1 天前
Rilmazafone :一款可视化 DMG 编辑器,拖拽排版一键生成
开源·编辑器·github