我有6次:财产_______不允许(也不知道该怎么办)

时间:2018-10-10 22:06:39

标签: python json debugging visual-studio-code launch

昨天,我的所有代码在我的Visual Studio代码中都运行良好。今天,在Windows更新之后,每次尝试调试时都会收到以下消息:

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)

我使用python 3.6.6,而launch.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": "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"
        ]
    }
]
}

请帮帮我。我尝试删除这些属性,但是没有用,并且一直在研究,但没有发现任何有用的方法:/

编辑:好的,现在我删除了旧的launch.json并创建了一个新的。它仍然失败,并显示“超时,等待调试器连接”消息,但没有告诉您问题可能出在哪里:\

1 个答案:

答案 0 :(得分:0)

我不知道为什么,但是现在我没有收到错误,一切正常。无论如何,感谢您的关注,并祝您有美好的一天

编辑:好的,它又发生了,但是现在我知道我通过添加一个来修复它:

"python.terminal.activateEnvironment": false

到settings.json,但是我上次删除它是因为我低估了它:P

相关问题