c++ 尝试添加配置时找不到g++生成和调试活动文件

juud5qan  于 8个月前  发布在  其他
关注(0)|答案(1)|浏览(191)

我在笔记本电脑上运行最新的vscode,安装了ubuntu 20.04上的.deb。C/C扩展v 1.9.7(最新)。
我在https://code.visualstudio.com/docs/cpp/config-linux中遵循了教程中的所有内容
我被困在调试中,因为我不能在launch.json中选择g
构建和调试活动文件
task.json自动生成如下

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: g++ build active file",
            "command": "/usr/bin/g++",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "compiler: /usr/bin/g++"
        }
    ]
}

字符串
当我试图选择运行>添加配置..并选择C++(GDB/LLDB)时,我看不到“g++ build and debug active file”x1c 0d1x的下拉列表
有什么建议吗?

tcbh2hod

tcbh2hod1#

事实证明,这实际上是C/C++扩展的最新版本(1.9.7)中的一个bug。
当我将降级到v1.8.4时,添加运行配置没有问题。
x1c 0d1x的数据

相关问题