參加你附近的 ,瞭解 VS Code 中的 AI 輔助開發。

開源 AI 程式碼編輯器

下載 Visual Studio Code

使用 VS Code 即表示您同意其許可證隱私宣告

任何模型,任何團隊

開箱即用 Claude Sonnet 等 AI 模型,或攜帶您自己的金鑰以訪問來自 Azure、Anthropic、Google、Ollama、OpenAI 和 OpenRouter 的模型。

Dropdown menu in GitHub Copilot Chat displaying AI model options: 'Claude 3.7 Sonnet' selected, with other options like 'Claude 3.5 Sonnet', 'GPT 4.5', 'GPT 4o', and 'Manage Models...' Dropdown menu in GitHub Copilot Chat displaying AI model options: 'Claude 3.7 Sonnet' selected, with other options like 'Claude 3.5 Sonnet', 'GPT 4.5', 'GPT 4o', and 'Manage Models...'

您的程式碼庫專家

您的程式碼庫會在本地和遠端(在 GitHub 上)被索引,以理解相關內容,從而實現快速、具備上下文感知的互動。

A VS Code chat prompt. The prompt includes codebase and file context by writing #codebase and #file:HistoryView.swift in the message. A VS Code chat prompt. The prompt includes codebase and file context by writing #codebase and #file:HistoryView.swift in the message.

AI 以您團隊的方式工作

使用根據您的工作流程、工具和專案量身定製的自定義指令和可複用提示檔案,來個性化互動。

Settings JSON for copilot instructions, the first set to `use React functional components', then including another file for extra instructions 'code-style.md'. Settings JSON for copilot instructions, the first set to `use React functional components', then including another file for extra instructions 'code-style.md'.

免費使用 VS Code 中的 AI 功能

無需試用。無需信用卡。只需您的 GitHub 帳戶。

免費試用

代理模式

處理複雜的多步驟任務。Agent 模式會讀取您的程式碼庫,跨檔案建議編輯,執行終端命令,並對編譯或測試失敗做出響應——所有這些都在一個迴圈中進行,直到任務完成。透過 VS Code 擴充套件和模型上下文協議(MCP)伺服器,進一步最佳化 Agent 模式以適應您團隊的工作流程。

使用 Agent 模式構建
VS Code window showing a code editor with projects.tsx open, alongside a chat panel in Agent mode. The chat discusses an open issue from GitHub. VS Code window showing a code editor with projects.tsx open, alongside a chat panel in Agent mode. The chat discusses an open issue from GitHub.

下一個編輯建議

VS Code 會在您編碼時預測您的下一步操作。使用 Tab 鍵即可在編輯器中直接接受由 AI 驅動的建議。它會根據您已進行的編輯,智慧地推薦要更改的內容和位置。

使用 AI 驅動的建議進行編碼
Code editor showing a JavaScript file post.js. It defines a render method that renders a social media post by calling an external API. Next edit suggestions is suggesting how to complete the implementation. Code editor showing a JavaScript file post.js. It defines a render method that renders a social media post by calling an external API. Next edit suggestions is suggesting how to complete the implementation.

使用任何語言進行編碼

VS Code 支援幾乎所有主流程式語言。內建了多種語言支援,如 JavaScript、TypeScript、CSS 和 HTML,而其他語言的擴充套件可以在 VS Code 市場中找到。

JavaScript 圖示JavaScript
TypeScript 圖示TypeScript
Python 圖示Python
C# 圖示C#
C++ 圖示C++
HTML 圖示HTML
Java 圖示Java
JSON 圖示JSON
PHP 圖示PHP
Markdown 圖示Markdown
Powershell 圖示Powershell
YAML 圖示YAML

完全可定製

自定義您的 VS Code 使用者介面和佈局,使其符合您的編碼風格。

顏色主題讓您可以修改 VS Code 使用者介面中的顏色,以適應您的偏好和工作環境。

設定同步功能使您可以在不同的 VS Code 例項之間共享您的使用者設定。

配置檔案讓您可以建立多套自定義設定,並快速在它們之間切換或與他人分享。

Selecting the GitHub Dark theme with a quick pick Selecting the GitHub Dark theme with a quick pick

隨時隨地編碼

無論您是連線到雲端、遠端倉庫,還是透過 VS Code for the Web (vscode.dev) 在瀏覽器中,都可以在您最高效的地方進行編碼。

內建原始碼管理為您提供了開箱即用的 Git 支援。透過擴充套件還可以使用許多其他原始碼管理提供商。

GitHub Codespaces為任何活動提供雲端開發環境——無論是長期專案,還是像審查拉取請求這樣的短期任務。

vscode.dev in an Edge browser tab vscode.dev in an Edge browser tab

透過豐富功能進行編碼

一個編輯器遠不止於此。無論是使用內建功能還是豐富的擴充套件,總有一款適合您。