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

相关推荐
我先去打把游戏先23 分钟前
VMware NAT 模式 Ubuntu 虚拟机「宿主机能上网、虚拟机 ping 不通外网 + apt 更新卡死」全故障复盘
linux·运维·vscode·单片机·嵌入式硬件·ubuntu·keil5
朝阳5812 小时前
VS Code 1.122 重磅登场:AI 全面自主,浏览器变身专业测试仪
人工智能·vscode
万粉变现经纪人2 小时前
2026最新Windows11系统CMD安装Claude Code 快速接入DeepSeek V4 Pro在VSCode编程工具中使用保姆级入门教程指南
linux·运维·ide·windows·vscode·macos·编辑器
兔老大RabbitMQ4 小时前
IDEA 打字打在光标右边 / 删除异常问题
java·ide·intellij-idea
码农小旋风5 小时前
Codex中文网 | Codex CLI 中文指南
运维·服务器·ide·人工智能·chatgpt·claude
问心无愧05135 小时前
ctf show web入门100
android·ide·笔记·android studio
AutumnWind042015 小时前
【Intelij IDEA使用手册】
java·ide·intellij-idea
你疯了抱抱我17 小时前
【Mac】vscode 配置 GD32E230CXXX 开发环境
ide·vscode·macos·嵌入式
CriticalThinking20 小时前
在 JetBrains IDE 中通过 ACP 协议集成 Claude Code等外部工具
ide·agent·ai编程
Smoothcloud润云21 小时前
5大功能精修,重构AI算力使用体验!
java·人工智能·windows·算法·重构·编辑器·sublime text