当前位置:   article > 正文

please specify ‘programme‘ in launch.json_launch.json" 中缺少配置“python: file”。

launch.json" 中缺少配置“python: file”。

故障现象:

在windows下点击F5,以运行vscode代码,在屏幕右下角出现这个错误提醒;

 

故障原因:

在配置文件(settings.json或者launch.json)中,缺少“program”这个参数配置;

解决办法(步骤不一定很准确):

法一:在settings.json的“launch”里面,确保含有:

                "type": "python",

                "request": "launch",

                "program": "${file}"

法二:

{

    // 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}",

            "console": "integratedTerminal",

            "justMyCode": true

        }

    ]

}

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号