美文网首页
Vscode 环境配置(持续更新)

Vscode 环境配置(持续更新)

作者: FluenceYHL | 来源:发表于2019-11-22 16:05 被阅读0次

    敬请期待

    C++

    编译运行
    安装 C++ 环境,参考安装 C++

    扩展 -> Coderunner -> install 即可运行单文件,不仅局限于 C++,c,也可 Python等

    如果要调试,继续向下看

    launch.json,修改 "miDebuggerPath"为自己的调试器的

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "C/C++",
                "type": "cppdbg",
                "request": "launch",
                "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
                "args": ["-exec info registers"],
                "stopAtEntry": false,
                "cwd": "${workspaceFolder}",
                "environment": [],
                "externalConsole": true,
                "MIMode": "gdb",
                "miDebuggerPath": "D:\\software\\C++\\MinGW\\bin\\gdb.exe",
                "preLaunchTask": "g++",
                "setupCommands": [
                    {
                        "description": "Enable pretty-printing for gdb",
                        "text": "-enable-pretty-printing",
                        "ignoreFailures": true
                    }
                ],
            },
        ]
    }
    

    tasks.json

    {
        "version": "2.0.0",
        "command": "g++",
        "args": [
            "-g",
            "${file}",
            "-o",
            "${fileDirname}/${fileBasenameNoExtension}.exe"
        ],
        "problemMatcher": {
            "owner": "cpp",
            "fileLocation": [
                "relative",
                "${workspaceRoot}"
            ],
            "pattern": {
                "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                "file": 1,
                "line": 2,
                "column": 3,
                "severity": 4,
                "message": 5
            }
        },
        "group": {
            "kind": "build",
            "isDefault": true
        }
    }
    

    Python

    扩展 -> Python

    插件推荐

    1. aync-setting

    插件与配置等多终端同步

    2.

    相关文章

      网友评论

          本文标题:Vscode 环境配置(持续更新)

          本文链接:https://www.haomeiwen.com/subject/fnvfwctx.html