> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 在设备上运行扩展

> 直接在您的开发套件上运行 Qualcomm® VS Code 扩展 — 无需单独的主机。

## 概述

本指南帮助您完全在开发套件上运行 Qualcomm® VS Code 扩展 — 无需单独的主机。将显示器、键盘和鼠标直接连接到设备即可在本地进行操作。

***

## 前提条件

<CardGroup cols={2}>
  <Card title="已安装 Visual Studio Code" icon="code" href="./install-vscode">
    继续操作前，请先在设备上安装 VS Code。
  </Card>

  <Card title="已安装扩展" icon="puzzle-piece" href="./install-extension">
    从 `.vsix` 文件安装 Qualcomm® VS Code 扩展。
  </Card>
</CardGroup>

***

## 使用扩展

<Steps>
  <Step title="打开扩展">
    在设备上启动 VS Code，并点击活动栏中的 **Qualcomm Visual Studio Code Extension** 图标。**Home** 页面加载并显示 **Get Started** 和 **Go to Dashboard** 按钮。

    <img src="https://mintcdn.com/qualcomm-staging/IpOQZ3a456y-ntjm/Tools/QVSCE/images/vscode_extension_icon.png?fit=max&auto=format&n=IpOQZ3a456y-ntjm&q=85&s=a8e22184107e142aca34117943bb5b1e" alt="VS Code — 活动栏中的 Qualcomm 扩展图标" width="359" height="274" data-path="Tools/QVSCE/images/vscode_extension_icon.png" />
  </Step>

  <Step title="前往 Dashboard">
    点击 **Go to Dashboard**。
  </Step>
</Steps>

扩展会自动检测到它正运行在设备上 — 该设备会出现在 Devices 列表中，带有 **On-Device** 徽标和 `Active (On-Device)` 状态，无需手动激活。

<img src="https://mintcdn.com/qualcomm-staging/IpOQZ3a456y-ntjm/Tools/QVSCE/images/on_device_badge_menu.png?fit=max&auto=format&n=IpOQZ3a456y-ntjm&q=85&s=9d3d9147695b62d2e5b57b61f7de6161" alt="Devices 页面显示带有 On-Device 徽标和 Active (On-Device) 状态的设备" width="1815" height="314" data-path="Tools/QVSCE/images/on_device_badge_menu.png" />

***

## 设置开发环境

首次打开设备卡片时，它会显示 **Dev environment not configured**。点击 **Set Up Dev Environment** 按钮，为设备端开发配置示例项目和工具。

您也可以随时通过设备卡片上的 **⋮** 菜单 → **Set Up Dev Environment** 触发此操作。

<img src="https://mintcdn.com/qualcomm-staging/IpOQZ3a456y-ntjm/Tools/QVSCE/images/on_device_not_configured.png?fit=max&auto=format&n=IpOQZ3a456y-ntjm&q=85&s=f493bdf9c054b18847b1ce3e4cc40486" alt="设备卡片显示 Dev environment not configured 状态" width="1994" height="353" data-path="Tools/QVSCE/images/on_device_not_configured.png" />

设置运行期间，设备卡片上会显示进度指示器。

<Note>
  需要互联网连接和约 2–3 GB 的可用磁盘空间；根据网络速度，耗时 10–20
  分钟。将安装 Qualcomm 运行时包（GStreamer、QNN、SNPE）和构建依赖项，添加
  `ms-vscode.cpptools` 扩展，并获取示例应用程序源码。
</Note>

<img src="https://mintcdn.com/qualcomm-staging/IpOQZ3a456y-ntjm/Tools/QVSCE/images/on_device_setup_progress.png?fit=max&auto=format&n=IpOQZ3a456y-ntjm&q=85&s=1006c8ca567458de6829affce0a6a81a" alt="设备卡片显示设置进度指示器" width="1838" height="1292" data-path="Tools/QVSCE/images/on_device_setup_progress.png" />

完成后，卡片会显示一个预装应用程序表格，包含其名称、位置和运行状态。

***

## 后续步骤

前往\*\*[构建与运行](../development/build-run)**编译并运行示例应用程序，或浏览**[示例项目](../development/projects)\*\*。
