VisualStudioCode属性控制台不允许错误

我是编程新手,我正在做一本书中的一些问题。并且被困在这个关于三角形面积的问题中。“不允许使用属性控制台”。这是由于 math.h 吗?因为相同的代码在 online-gdb 上功能齐全。

这是 lauch.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": "gcc - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "console": "externalTerminal",
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: gcc build active file",
            "miDebuggerPath": "/usr/bin/gdb"
        }
    ]
}

回答

代替

"console": "externalTerminal"

"externalConsole": true

此版本的自动生成的 launch.json 似乎不支持“控制台”属性。但是,这可以帮助我摆脱警告消息。


以上是VisualStudioCode属性控制台不允许错误的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>