在 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 iconJavaScript
TypeScript iconTypeScript
Python iconPython
C# iconC#
C++ iconC++
HTML iconHTML
Java iconJava
JSON iconJSON
PHP iconPHP
Markdown iconMarkdown
Powershell iconPowershell
YAML iconYAML

完全可定制

自定义您的 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

随处编码

无论您连接到云、远程存储库,还是在浏览器中使用 VS Code for the Web (vscode.dev),都可以在最高效的环境中编写代码。

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

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

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

使用丰富的功能编写代码

编辑器还有很多其他功能。无论是使用内置功能还是丰富的扩展,总有一些适合您。