vscode windows下 tasks.json 和 launch.json

tasks.json

{
    "tasks": [
        {
            "type": "shell",
            "label": "g++ build active file",
            "command": "C:\\Program Files\\mingw64\\bin\\g++.exe",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "C:\\Program Files\\mingw64\\bin"
            }
        },
        {
            "type": "cppbuild",
            "label": "C/C++: g++ 生成活动文件",
            "command": "C:\\Program Files\\mingw64\\bin\\g++.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": "build",
            "detail": "编译器: C:\\Program Files\\mingw64\\bin\\g++.exe"
        }
    ],
    "version": "2.0.0"
}

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++ - 生成和调试活动文件",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "C:\\Program Files\\mingw64\\bin",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "为 gdb 启用整齐打印",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "g++ build active file",
            "miDebuggerPath": "C:\\Program Files\\mingw64\\bin\\gdb.exe",
        }
    ]
}

相关推荐

  1. 对象(

    2023-12-25 12:58:01       16 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-25 12:58:01       17 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-25 12:58:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-25 12:58:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-25 12:58:01       18 阅读

热门阅读

  1. SQL分类

    SQL分类

    2023-12-25 12:58:01      30 阅读
  2. mysql全局事务变量GTID

    2023-12-25 12:58:01       23 阅读
  3. leetcode 131. 分割回文串

    2023-12-25 12:58:01       36 阅读
  4. [网络安全] NTFS权限

    2023-12-25 12:58:01       42 阅读
  5. 《PCI Express体系结构导读》随记 —— 前言

    2023-12-25 12:58:01       32 阅读
  6. Mybatis使用详解

    2023-12-25 12:58:01       40 阅读
  7. Linux 文件管理命令----pwd 命令

    2023-12-25 12:58:01       38 阅读
  8. C/C++编译问题

    2023-12-25 12:58:01       25 阅读
  9. (c语言)素数的判断方法

    2023-12-25 12:58:01       45 阅读
  10. 力扣labuladong——一刷day79

    2023-12-25 12:58:01       36 阅读