参加你附近的 ,了解 VS Code 中的 AI 辅助开发。

开源人工智能代码编辑器

下载 Visual Studio Code

使用 VS Code 即表示您同意其许可证隐私声明

任何团队的任何模型

从多个开箱即用的模型中选择,或者带上您自己的密钥,从您首选的模型提供商和托管选项访问模型。

GPT-5
自动 变量 GPT-5 mini 0x Claude Sonnet 4 1x Claude Sonnet 4.5 (预览版) 1x GPT-5 1x GPT-5-Codex (预览版) 1x 管理模型...

您的代码库专家

您的代码库在本地和远程(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.

像您的团队一样工作的人工智能

使用自定义指令和可重复使用的提示文件,根据您的工作流程、工具和项目定制交互。

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 帐户。

免费试用

代理模式

处理复杂的、多步骤的任务。代理模式会读取您的代码库,建议跨文件的编辑,运行终端命令,并响应编译或测试失败——所有这些都在一个循环中,直到任务完成。使用 VS Code 扩展和模型上下文协议 (MCP) 服务器,进一步调整代理模式以适应您团队的工作流程。

使用代理模式构建
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 Marketplace 中找到。

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 UI 和布局,使其符合您的编码风格。

颜色主题允许您修改 VS Code 用户界面中的颜色,以适应您的偏好和工作环境。

设置同步使您可以通过设置同步功能在您的 VS Code 实例之间共享您的用户设置。

配置文件允许您创建一组自定义设置,并在它们之间快速切换或与他人共享。

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

随时随地编码

无论您是连接到云端、远程仓库,还是通过 Web 版 VS Code (vscode.dev) 在浏览器中,都可以在您最高效的地方进行编码。

内置源代码控制为您提供了开箱即用的 Git 支持。许多其他源代码控制提供程序可以通过扩展获得。

GitHub Codespaces 为任何活动提供云端开发环境——无论是长期项目,还是像审查拉取请求这样的短期任务。

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

通过丰富功能进行编码

编辑器还有更多功能。无论是使用内置功能还是丰富的扩展,每个人都能找到适合自己的东西。

© . This site is unofficial and not affiliated with Microsoft.