# Visual Studio Code

Microsoft 推出的可扩展代码编辑器，具备调试、Git 集成、集成终端、远程开发和可选 AI 辅助功能。

> 这是 OpenNavo 上 Visual Studio Code 页面的 Markdown 版本，内容与网页相同： <https://opennavo.com/zh/apps/visual-studio-code>

- **最新版本**: `1.147.0`
- **开发者**: Microsoft
- **主页**: <https://code.visualstudio.com/>
- **分类**: [开发工具](https://opennavo.com/zh/categories/developer-tools)
- **安装**: `brew install --cask visual-studio-code`
- **近 30 天安装**: 46,541
- **Homebrew**: 可以安装，应用会自行更新
- **下载地址**: <https://update.code.visualstudio.com/1.147.0/darwin-arm64/stable>
- **SHA-256**: `149d944feb599b076b48406b174e1c3cd1d510e9d673854777a20a6f4116a59a`
- **附带命令**: code, code-tunnel

SHA-256 只用来核对下载的文件是否完整，不代表安全认证。

## 安装与卸载内容

```json
[
  {
    "declaration": {
      "uninstall": [
        {
          "launchctl": "com.microsoft.VSCode.ShipIt",
          "quit": "com.microsoft.VSCode"
        }
      ]
    },
    "phase": "uninstall",
    "sources": [],
    "type": "uninstall"
  },
  {
    "declaration": {
      "app": [
        "Visual Studio Code.app"
      ],
      "target": "/Applications/Visual Studio Code.app"
    },
    "phase": "install",
    "sources": [
      "Visual Studio Code.app"
    ],
    "target": "/Applications/Visual Studio Code.app",
    "type": "app"
  },
  {
    "declaration": {
      "binary": [
        "$APPDIR/Visual Studio Code.app/Contents/Resources/app/bin/code"
      ],
      "target": "$HOMEBREW_PREFIX/bin/code"
    },
    "phase": "install",
    "sources": [
      "$APPDIR/Visual Studio Code.app/Contents/Resources/app/bin/code"
    ],
    "target": "$HOMEBREW_PREFIX/bin/code",
    "type": "binary"
  },
  {
    "declaration": {
      "binary": [
        "$APPDIR/Visual Studio Code.app/Contents/Resources/app/bin/code-tunnel"
      ],
      "target": "$HOMEBREW_PREFIX/bin/code-tunnel"
    },
    "phase": "install",
    "sources": [
      "$APPDIR/Visual Studio Code.app/Contents/Resources/app/bin/code-tunnel"
    ],
    "target": "$HOMEBREW_PREFIX/bin/code-tunnel",
    "type": "binary"
  },
  {
    "declaration": {
      "zap": [
        {
          "trash": [
            "~/.vscode",
            "~/Library/Application Support/Code",
            "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.vscode.sfl*",
            "~/Library/Caches/com.microsoft.VSCode",
            "~/Library/Caches/com.microsoft.VSCode.ShipIt",
            "~/Library/HTTPStorages/com.microsoft.VSCode",
            "~/Library/Preferences/ByHost/com.microsoft.VSCode.ShipIt.*.plist",
            "~/Library/Preferences/com.microsoft.VSCode.helper.plist",
            "~/Library/Preferences/com.microsoft.VSCode.plist",
            "~/Library/Saved Application State/com.microsoft.VSCode.savedState"
          ]
        }
      ]
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## 介绍

Visual Studio Code 是 Microsoft 面向 macOS 的免费代码编辑器，将语法高亮、IntelliSense、调试、Git 集成和集成终端整合在一个应用中。它开箱即支持 JavaScript 和 TypeScript，并可通过扩展添加其他语言。内置的 Settings Sync 和远程开发可将同一工作区扩展到不同机器、SSH 主机、容器和 WSL。本页涵盖官方 Stable 版本、安装、扩展、隐私设置、更新，以及它与 Cursor 和 Zed 的对比。

### 编辑器提供的内容

编辑器可打开文件夹和工作区，支持跨文件搜索、多光标编辑、代码折叠、代码片段，以及可执行大多数操作的命令面板。IntelliSense 补全和重构由语言扩展提供，内置调试器可与这些扩展提供的调试适配器配合工作。源代码管理视图无需离开窗口即可暂存、提交、创建分支和查看 Git 历史记录，集成终端则在项目目录中运行构建和测试命令。

来自 Visual Studio Marketplace 的扩展可添加语言、主题、linter、调试器和工作流工具。每个扩展按其声明的权限运行，因此安装前请检查发布者信息和工作区信任提示。[Developer Workbench 合集](/collections/developer-workbench) 列出了适用于 macOS 的其他编辑器和命令行工具。

### 在 Mac 上安装并打开项目

使用 `brew install --cask visual-studio-code` 安装，或从 code.visualstudio.com 下载 Apple Silicon、Intel 或 Universal 安装程序。Homebrew cask 会链接 `code` 命令；如果使用官方安装程序，请从命令面板运行 `Shell Command: Install 'code' command in PATH`。然后 `code .` 打开当前文件夹，`code --new-window` 启动单独的窗口。

安装项目所需的语言运行时、编译器和调试器；编辑器不会替代所有工具链。如需 .NET，请安装 [.NET SDK](/apps/dotnet-sdk)。 Settings Sync 为内置功能：使用 GitHub 或 Microsoft 账户登录，运行 `Settings Sync: Turn On`，然后选择要跨机器同步的设置、键绑定、代码片段、扩展和 UI 状态。设置保存在 JSON 文件中，也可以直接编辑或提交到 dotfiles 仓库。

### 远程开发与系统要求

Remote Development 扩展可将编辑器连接到另一台机器，而界面仍保留在本地。Remote - SSH 可与任何可访问的 SSH 主机配合，Dev Containers 在容器内运行工作区，WSL 面向 Windows 上的 Linux 发行版，Remote - Tunnels 可连接到没有入站网络访问的机器。扩展可在远程主机上运行，从而使语言服务器和构建过程贴近代码。

Microsoft 将 1.6 GHz 或更快的处理器和 1 GB 内存列为编辑器的最低配置；大型工作区、扩展、容器和 AI 功能可能需要更多资源。Mac 支持范围跟随可获得 Apple 安全更新的 macOS 版本，通常是当前最新版本及此前两个版本。Homebrew cask 未声明单独的 macOS 最低版本号。[Developer Tools 类别](/categories/developer-tools) 列出了相关的构建和运行时工具。

### 价格、许可和遥测

根据 Microsoft 的 VS Code 产品许可证，该编辑器可免费用于个人和商业用途。底层的 `microsoft/vscode` 源代码采用 MIT 许可，但官方版本包含 Microsoft 特定的资产和集成，并有其自己的产品许可证；扩展则保留各自的许可证。AI 功能为可选，使用 GitHub Copilot 或受支持的模型配置，其可用性和限制由套餐或提供商决定。

VS Code 默认发送遥测数据。在设置中将 `telemetry.telemetryLevel` 设为 `off` 即可禁用；设为 `error` 和 `crash` 可将收集范围缩小到错误或崩溃报告。Workspace Trust 和扩展权限提供了进一步的控制，受管理的组织可通过设备管理强制执行策略。

### 版本与更新

当前 Stable 版本为 1.145.0，发布于 2026-11-04。其发行说明介绍了远程代理会话、定时自动化、可调整的代理详细程度和文件排除。Stable 版本每月发布；VS Code Insiders 提供即将推出功能的每日构建。自动更新默认开启，`update.mode` 设置可切换为手动检查或禁用更新。如需通过 Homebrew 更新，请运行 `brew upgrade --cask visual-studio-code`。

### 替代方案

Cursor 是基于 VS Code 代码库构建的独立商业编辑器，以 AI 辅助编辑为核心；设置和许多扩展可以导入。Zed 是一款原生协作编辑器，拥有自己的扩展和 AI 功能。两者都不是能直接替换所有扩展的方案。如需基于终端的 AI 编码，请参阅 [Copilot CLI](/apps/copilot-cli) 和 [Codex](/apps/codex)；[Cursor](/apps/cursor) 和 [Zed](/apps/zed) 在各自的页面中介绍。

### 常见问题

#### Visual Studio Code 是否免费？

是的。根据 Microsoft 的产品许可证，该编辑器可免费用于个人和商业用途。扩展和 GitHub Copilot 等 AI 服务可能有各自的条款或费用。

#### 我需要 Microsoft 或 GitHub 账户吗？

核心编辑功能不需要：编辑器可离线使用，无需登录。Settings Sync 和 Copilot 需要 GitHub 或 Microsoft 账户。

#### 如何关闭遥测？

在设置中将 `telemetry.telemetryLevel` 设为 `off`，或在受管理环境中使用相应策略。更改设置后请重启编辑器。

#### VS Code 是否在 Apple Silicon 上原生运行？

是的。Microsoft 提供 Apple Silicon、Intel 和 Universal 安装程序，Homebrew cask 会选择匹配的版本。

#### 如何更新 VS Code？

自动更新默认启用。如需手动更新，请使用 Code > Check for Updates，或对 Homebrew 安装运行 `brew upgrade --cask visual-studio-code`。

最后更新：2026-11-05。来源：Microsoft Visual Studio Code 文档（安装、要求、设置同步、远程开发、遥测）、VS Code 1.145 发行说明以及 Homebrew cask 元数据。

### 官方参考

- [Visual Studio Code](https://code.visualstudio.com/)
- [Mac 安装](https://code.visualstudio.com/docs/setup/mac)
- [系统要求](https://code.visualstudio.com/docs/supporting/requirements)
- [Settings Sync](https://code.visualstudio.com/docs/configure/settings-sync)
- [Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
- [遥测](https://code.visualstudio.com/docs/configure/telemetry)
- [发行说明](https://code.visualstudio.com/updates)

## 系统要求

- 适用于 macOS 27, 26, 15, 14, 13, 12 的版本 · 应用版本: 1.147.0 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 核查于 2026-11-22
  - <https://update.code.visualstudio.com/1.147.0/darwin/stable>
  - SHA-256: `a91677b96c1a73de366f54cb4a497c8095459e07e95457ffab985820f93fb298`
- 适用于 macOS 27, 26, 15, 14, 13, 12 的版本 · 应用版本: 1.147.0 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 核查于 2026-11-22
  - <https://update.code.visualstudio.com/1.147.0/darwin-arm64/stable>
  - SHA-256: `149d944feb599b076b48406b174e1c3cd1d510e9d673854777a20a6f4116a59a`
- 适用于 macOS 11 的版本 · 应用版本: 1.106.3 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 核查于 2026-11-22
  - <https://update.code.visualstudio.com/1.106.3/darwin/stable>
  - SHA-256: `c41872149a205f3a3be3e5d3a8f04920407a0762531e607f78dc93f4d4813cda`
- 适用于 macOS 11 的版本 · 应用版本: 1.106.3 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 核查于 2026-11-22
  - <https://update.code.visualstudio.com/1.106.3/darwin-arm64/stable>
  - SHA-256: `35dd438808dde1dd1f65490ffe7713ed64102324c0809efbec0b4eb2809b218b`

## Visual Studio Code 的安全事实

这里只列可以核验的事实，并注明来源和日期，不是安全认证。要检查你下载的文件，可以用 OpenNavo 在本机扫描。

- <https://github.com/microsoft/vscode> · 是否开源: 是 — <https://github.com/microsoft/vscode> · 核查于 2026-11-13

## 卸载

- `brew uninstall --cask visual-studio-code`

普通卸载会删除应用本身，设置和缓存会保留。

### 卸载时还会处理

- 后台服务（launchctl）: `com.microsoft.VSCode.ShipIt` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

### 深度清理（可选）

- `brew uninstall --zap --cask visual-studio-code`

`--zap` 还会删除 Homebrew 定义里列出的设置、缓存等文件，其中可能有其他应用共用的数据，删除后无法恢复；它也不保证没有任何残留。请先备份需要保留的数据；如要保留设置和缓存，请不要加 `--zap`。

普通卸载会删除应用本身，设置和缓存会保留。

- 文件和文件夹: `~/.vscode` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Application Support/Code` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.vscode.sfl*` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Caches/com.microsoft.VSCode` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Caches/com.microsoft.VSCode.ShipIt` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/HTTPStorages/com.microsoft.VSCode` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Preferences/ByHost/com.microsoft.VSCode.ShipIt.*.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Preferences/com.microsoft.VSCode.helper.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Preferences/com.microsoft.VSCode.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Saved Application State/com.microsoft.VSCode.savedState` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-22；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

## 最新版本说明

### 1.147.0 (2026-11-18)

Visual Studio Code 1.147.0 给在 Mac 上写代码的人：代理请求可以存成草稿或改到以后发，模型路由会替你选模型。

**代理**

- 请求可以改到以后发，也可以存成几份草稿。
- 模型路由按你写的路线选模型。
- 把远程共享成 GitHub Environment。

**编辑器**

- 在聊天里预览代理的 HTML 回答或原生图表。
- 代理可以操作你的默认浏览器。

## 资料与来源

- <https://opennavo.com/zh/apps/visual-studio-code>
- <https://opennavo.com/zh/apps/visual-studio-code/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/v/visual-studio-code.rb> · 核查于 2026-11-22
- <https://formulae.brew.sh/cask/visual-studio-code>
- <https://github.com/microsoft/vscode> · 核查于 2026-11-13
