关于设置Python调试的VSCode的一个问题

关于设置Python调试的VSCode的一个问题,python,visual-studio-code,Python,Visual Studio Code,vs代码版本:1.29.1(1.29.1) python版本:3.6.5 Launch.json: { "name": "Python", "type": "python", "pythonPath":"${config.python.pythonPath}", "request": "launch", "stopOnEntry": true, "console": "none",

vs代码版本:1.29.1(1.29.1)

python版本:3.6.5


Launch.json:

     {
        "name": "Python",
        "type": "python",
        "pythonPath":"${config.python.pythonPath}", 
        "request": "launch",
        "stopOnEntry": true,
        "console": "none",
        "program": "${file}",
        "cwd": "${workspaceRoot}",
        "debugOptions": [
            "WaitOnAbnormalExit",
            "WaitOnNormalExit",
            "RedirectOutput"
        ],
        "env": {"name":"value"}
    }
工作空间设置:

     {
"python.pythonPath": "/usr/local/opt/python/libexec/bin/python",
"python.linting.pylintEnabled": true
     }


当我测试调试时,我失败了


上面说“在开始调试之前,您需要选择一个Python解释器”。 但我实际上选择了左下角的一个版本


任何部分都不正确?

VS代码网站上提供的文档可能会有所帮助。你有没有试着从这里得到推荐信?

我按照下面的代码进行编辑,它可以工作

{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": true
}