Vscode使用教程

1.安装编译器

https://sourceforge.net/projects/mingw-w64/
下载x86_64-win32-seh
解压缩放到非中文路径下,然后并把mingw64\bin添加到系统环境变量Path中

2.task.json

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

{
    // 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

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
VSCODE是一款功能强大的代码编辑器,下面是一些使用教程的内容: 1. 使用命令面板:在VSCODE中,你可以使用命令面板来快速搜索和执行命令。你可以通过按下Ctrl+Shift+P(Windows/Linux)或者Cmd+Shift+P(Mac)来打开命令面板。在命令面板中,你可以输入关键字来搜索需要的命令,并且通过键盘操作来执行命令。\[1\] 2. 安装VSCODE:在安装VSCODE时,你可以选择使用User Installer版本或者System Installer版本。User Installer版本是默认提供的版本,而System Installer版本可以自定义安装路径,方便后期管理。根据实际开发需求和对系统文件管理的难易度,我更推荐使用System Installer版本。\[2\] 3. 使用命令行打开文件:你可以使用命令行来打开文件或者文件夹。在命令行中输入"code"命令,后面加上文件或者文件夹的地址,VSCODE就会在一个新窗口中打开该文件或文件夹。如果你希望使用已经打开的窗口来打开文件,可以在"code"命令后添加参数"-r"来进行窗口的复用。\[3\] 希望以上信息对你有帮助!如果你还有其他问题,请随时提问。 #### 引用[.reference_title] - *1* *3* [Visual Studio Code 入门教程](https://blog.csdn.net/duleilewuhen/article/details/121706354)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [VSCode安装配置使用教程(最新版超详细保姆级含插件)一文就够了](https://blog.csdn.net/MSDCP/article/details/127033151)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值