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

相关推荐
yz_aiks17 小时前
IDEA终端配置oh-my-zsh实战:安装、插件与日常使用技巧
java·ide·intellij-idea
小yu学编程18 小时前
IDEA 2025版本中如何设置包层级结构
java·ide·intellij-idea·层级结构
YXWik618 小时前
CodeGraph安装及在idea的claude code插件中使用
java·ide·intellij-idea
wbc1031555818 小时前
基于 VSCode + Icarus 的 Verilog 编译和仿真
ide·vscode·编辑器
weixin_4520776418 小时前
oai compatible provider for copilot for deepseek UI界面设置
vscode·copilot
xiaobobo333019 小时前
vscode如何免秘钥登入Ubuntu
vscode·ssh·免秘钥登入·ubuntu虚拟机
似夜晓星辰19 小时前
Markdown文本编辑器Typora平替
编辑器·github
谷哥的小弟21 小时前
(最新版)VSCode安装图文详解教程
ide·vscode·编辑器·教程·前端开发·图文
xiaoliuliu1234521 小时前
LaTeX 2023 (TeX Live + TeXstudio) 安装与汉化教程 Windows版:自定义路径+编辑器配置指南
windows·编辑器
IOT.FIVE.NO.11 天前
Codex+Vscode+Remote ssh+ 服务器自定义第三方API配置保姆级教程
ide·vscode·编辑器