我是 VScode 的新手,想在其中為我的大學專案運行 Python。我已經看到,在 VScode 中,所有程式都在 Windows PowerShell 終端(默認情況下)中執行。但問題是它還顯示了我不想要的正在執行的檔案地址。所以,請你給一個建議,在終端中應該使用哪個軟體,它只執行代碼而不顯示任何檔案地址。我該如何改變它?
uj5u.com熱心網友回復:
ctrl shift ` is a Command Used to open terminal in VS code .. You can also Try Extension of python shell or powershell in VSCode ...
uj5u.com熱心網友回復:
VS code 支持多個 shell。默認情況下,它是 windows 上的 powershell (PS >)
單擊“選擇默認組態檔”進行更改(并重新啟動 VS 代碼),或者您可以直接單擊任何可用的 shell(如下圖所示)。
關于隱藏“檔案地址” - 您可以隨時更改外殼在加載時讀取的相應設定檔案。
例如:bash shell 使用 .bashrc 設定檔案。可以在此處為 bash 檢查如何隱藏檔案路徑:
uj5u.com熱心網友回復:
你可以試試擴展名Code Runner,它會是這樣的:

否則,您可以將launch.json檔案中“console”的值更改為internalConsole,然后以除錯模式(F5)運行python檔案,它會是這樣的:


轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/349006.html
標籤:Python 电源外壳 视觉工作室代码 vscode 设置
上一篇:無法將字串轉換為浮動“價格”
