VS Code 配置启动指定文件

"configurations": [
    {
        "name": "Python: 当前文件",
        "type": "python",
        "request": "launch",
        "program": "${workspaceFolder}\\main.py",
        "console": "integratedTerminal"
    }
]

修改 program 参数. 修改前:  "program": "${file}"

修改前 只会运行当前正在显示的py文件, 如不是入口文件就会编译跳过或报错. 

转载: https://blog.csdn.net/lingtianyulong/article/details/104334298

你可能感兴趣的:(python)