欢迎光临散文网 会员登陆 & 注册

VS CODE/G++配置文件备份

2022-07-08 19:51 作者:coyude  | 我要投稿

launch.json:

{

    // 使用 IntelliSense 了解相关属性。

    // 悬停以查看现有属性的

    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387

    "version": "0.2.0",

    "configurations": [

        {

            "name": "GDB启动",

            "type": "cppdbg",

            "request": "launch",

            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",

            "args": [],

            "stopAtEntry": false,

            "cwd": "${fileDirname}",

            "environment": [],

            "externalConsole": true,

            "MIMode": "gdb",

            "miDebuggerPath": "D:\\MinGW-w64 TDM-64\\bin\\gdb.exe",

            "setupCommands": [

                {

                    "description": "为 gdb 启用整齐打印",

                    "text": "-enable-pretty-printing",

                    "ignoreFailures": true

                },

                {

                    "description":  "将反汇编风格设置为 Intel",

                    "text": "-gdb-set disassembly-flavor intel",

                    "ignoreFailures": true

                }

            ],

            "preLaunchTask": "C/C++: gcc.exe build active file"  // 调试前的预执行任务,这里的值是tasks.json文件中对应的编译任务,也就是调试前需要先编译

           

        }


    ]

}


tasks.json:

{

    "tasks": [

        {

            "type": "shell",

            "label": "C/C++: gcc.exe build active file",

            "command": "D:/MinGW-w64 TDM-64/bin/g++.exe",

            "args": [

                "-fdiagnostics-color=always",

                "-g",

                "${file}",

                "-o",

                "${fileDirname}\\${fileBasenameNoExtension}.exe"

            ],

            "options": {

                "cwd": "D:/MinGW-w64 TDM-64/bin"

            },

            "problemMatcher": [

                "$gcc"

            ],

            "group": {

                "kind": "build",

                "isDefault": true

            },

            "detail": "调试器生成的任务。"

        }

    ],

    "version": "2.0.0"

}


VS CODE/G++配置文件备份的评论 (共 条)

分享到微博请遵守国家法律