Visual Studio Code Property Console not allowed error

Viewed 6456

i am new to programming and i was doing some of these questions of a book.And got stuck in this question about area of a triangle."Property console is not allowed".Is it due to the math.h? Because the same code is fully functional on online-gdb.

Image show's the error

here is content of 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"
        }
    ]
}
2 Answers

Replace

"console": "externalTerminal"

with

"externalConsole": true

Seems like "console" property is not supported in this version of auto-generated launch.json. However this does the trick to get rid of the warning message for me.

Hmm, now I'm getting "Property externalConsole is not allowed"

Related