VS Code 配置啓動指定文件

因爲,個人習慣將 python 的工程中,定義 main.py 並默認啓動 main 函數所在的文件;在VS code 進行如下配置:

{
    // 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: 當前文件",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}\\main.py",
            "console": "integratedTerminal"
        }
    ]
}

 

發佈了53 篇原創文章 · 獲贊 53 · 訪問量 29萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章