使用 Visual Studio Code 在 Windows 子系統 Linux 版中進行開發

初級
開發人員
Visual Studio Code

在本課程模組中,您將了解如何使用 Windows 子系統 Linux 版 (WSL) 搭配 Visual Studio Code (VS Code)。 我們會探索使用 WSL 的安裝流程和基本概念。 此外,我們會安裝及利用 Visual Studio Code WSL 延伸模組。 最後,我們會示範如何在 WSL 環境內的 VS Code 中偵錯和執行 Python 程式碼。

注意

本課程模組包含 Windows 子系統 Linux 版 (WSL) 上的入門。 如需深入了解 WSL,請參閱什麼是 Windows 子系統 Linux 版?

學習目標

在本課程模組結束時,您應該能夠:

  • 在 Windows 電腦上安裝及使用 Windows 子系統 Linux 版。
  • 安裝及使用 Visual Studio Code WSL 延伸模組。
  • 使用 Visual Studio Code 對 WSL 中的 Python 程式碼進行偵錯。

必要條件

  • 執行 Windows 11 或 Windows 10 的電腦
  • 以系統管理員身分執行 PowerShell 或 Windows 命令提示字元的能力
  • 已在電腦上安裝 Visual Studio Code
  • 對使用軟體外掛程式或延伸模組來自訂應用程式的概念有基本了解