在 VS Code 中试用

您的代码编辑器。由 AI 重新定义。

试用代理模式

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

免费试用

代理模式

处理复杂的、多步骤的任务。代理模式会读取您的代码库,在文件间建议编辑,运行终端命令,并响应编译或测试失败——所有这些都循环进行,直到任务完成。使用 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 市场中找到。

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 网页版 (vscode.dev) 在浏览器中,都可以在您效率最高的地方编写代码。

内置源代码管理为您提供开箱即用的 Git 支持。许多其他源代码管理提供商可通过扩展获得。

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

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

使用丰富的功能编写代码

编辑器还有很多功能。无论是使用内置功能还是丰富的扩展,总有适合每个人的选择。