Search code examples
pythonjsondebuggingvisual-studio-codelaunch

I am getting 6 times: Property _______ is not allowed (and don't know what to do)


Yesterday, all my codes worked fine in my visual studio code. Today, after a windows update, I get the following messages everytime I try to debug:

Property localRoot is not allowed. (17, 13)
Property remoteRoot is not allowed. (18, 13)
Property secret is not allowed. (20, 13)
Property debugOptions is not allowed. (47, 13)
Property debugOptions is not allowed. (79, 13)
Property debugOptions is not allowed. (111, 13)

I use python 3.6.6 and my launch.json is as following:

{
// 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": "Python: Current File",
        "type": "python",
        "request": "launch",
        "program": "${file}"
    },
    {
        "name": "Python: Attach",
        "type": "python",
        "request": "attach",
        "localRoot": "${workspaceFolder}",
        "remoteRoot": "${workspaceFolder}",
        "port": 3000,
        "secret": "my_secret",
        "host": "localhost"
    },
    {
        "name": "Python: Terminal (integrated)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal"
    },
    {
        "name": "Python: Terminal (external)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "externalTerminal"
    },
    {
        "name": "Python: Django",
        "type": "python",
        "request": "launch",
        "program": "${workspaceFolder}/manage.py",
        "args": [
            "runserver",
            "--noreload",
            "--nothreading"
        ],
        "debugOptions": [
            "RedirectOutput",
            "Django"
        ]
    },
    {
        "name": "Python: Flask (0.11.x or later)",
        "type": "python",
        "request": "launch",
        "module": "flask",
        "env": {
            "FLASK_APP": "app.py"
        },
        "args": [
            "run",
            "--no-debugger",
            "--no-reload"
        ]
    },
    {
        "name": "Python: Module",
        "type": "python",
        "request": "launch",
        "module": "module.name"
    },
    {
        "name": "Python: Pyramid",
        "type": "python",
        "request": "launch",
        "args": [
            "${workspaceFolder}/development.ini"
        ],
        "debugOptions": [
            "RedirectOutput",
            "Pyramid"
        ]
    },
    {
        "name": "Python: Watson",
        "type": "python",
        "request": "launch",
        "program": "${workspaceFolder}/console.py",
        "args": [
            "dev",
            "runserver",
            "--noreload=True"
        ]
    },
    {
        "name": "Python: All debug Options",
        "type": "python",
        "request": "launch",
        "pythonPath": "${config:python.pythonPath}",
        "program": "${file}",
        "module": "module.name",
        "env": {
            "VAR1": "1",
            "VAR2": "2"
        },
        "envFile": "${workspaceFolder}/.env",
        "args": [
            "arg1",
            "arg2"
        ],
        "debugOptions": [
            "RedirectOutput"
        ]
    }
]
}

Please, help me. I tried removing the properties, but didn't work and have been researching but don't find anything useful :/

Edit: Ok, now I deleted the old launch.json and created a new one. It still fails and give me a "Timeout waiting for debugger connection" message, but it doesn't tell what the problem could be :\


Solution

  • I don't know why, but now I'm not getting the error and everything works fine. Anyway, thanks for your attention and wish you a nice day

    Edit: Ok, it happened again, but now I know that I fixed it by adding a:

    "python.terminal.activateEnvironment": false
    

    to the settings.json, but I deleted it last time because I desestimated it :P