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
}
]
}