Python VSCode 配置固定的脚本入口

Python VSCode 配置固定的脚本入口

打开或者新建一个启动配置

在这里插入图片描述

选择 .vscode目录下 launch.json文件

将 “program”: “${file}” 替换成
“program”: “mian.py”, //完成你自己的入口.py文件名即可

在这里插入图片描述

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: main.py",
            "type": "python",
            "request": "launch",
            // "program": "${file}",
            "program": "mian.py",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}

相关推荐

  1. 轻量脚本语言Lua配置与c++调用

    2023-12-15 16:04:03       19 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-15 16:04:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-15 16:04:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-15 16:04:03       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-15 16:04:03       20 阅读

热门阅读

  1. 某60内网渗透之DNS隧道通信初探-dnscat2与C&C

    2023-12-15 16:04:03       38 阅读
  2. 【Linux】多线程相关问题

    2023-12-15 16:04:03       39 阅读
  3. 鸿蒙arkTs Toast抽取 及使用

    2023-12-15 16:04:03       40 阅读
  4. 常用的调试方法(段错误产生原因)

    2023-12-15 16:04:03       41 阅读
  5. Linux常见面试题30题详细答案解析(二)

    2023-12-15 16:04:03       34 阅读
  6. Spring Boot中Web类型

    2023-12-15 16:04:03       38 阅读
  7. 取火柴游戏

    2023-12-15 16:04:03       40 阅读
  8. C语言:实现字符串连接

    2023-12-15 16:04:03       43 阅读