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