ohos-app-build-debug

Build, install, launch, and debug HarmonyOS/OpenHarmony apps via hvigorw and hdc.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill ohos-app-build-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ohos-app-build-debug
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/ohos-app-build-debug
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill ohos-app-build-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill removes the friction of building, deploying, starting, and diagnosing HarmonyOS/OpenHarmony applications by automating DevEco Studio environment setup and common device workflows.

Core Features & Use Cases

  • End-to-End OHOS Workflow: Build an app with hvigorw, install the generated HAP to a connected device via hdc, then launch the app (or the chosen Ability) for quick verification.
  • Debug & Verification Helpers: Take device screenshots to confirm UI/runtime behavior and parse crash stacks using hstack to identify root causes with symbol files.
  • Toolchain & Environment Detection: Automatically detects DevEco Studio installation and configures required environment variables (JAVA_HOME, PATH, SDK/toolchain locations, HDC port) to reduce setup errors.

Quick Start

Tell the AI to build, install, and launch your app by running the skill scripts in your OHOS project directory.

Frequently Asked Questions about ohos-app-build-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and deploy a HarmonyOS app to a connected device?

To build and deploy a HarmonyOS app, compile the project using hvigorw, then install the generated HAP file to a connected device via hdc commands. This automates the end-to-end OHOS deployment process.

How do I parse a crash stack for an OpenHarmony application?

Parse an OpenHarmony application crash stack using hstack with symbol files to identify root causes. This translates raw crash data into readable stack traces for accurate investigation.

Does the OHOS build and debug workflow require manual DevEco Studio environment configuration?

No, OHOS build and debug workflows do not require manual DevEco Studio configuration. The process automatically detects the installation and resolves required environment variables like JAVA_HOME, PATH, and HDC ports.

Can I launch a specific Ability when starting a HarmonyOS app on a device?

Yes, you can launch a specific Ability when starting a HarmonyOS app. The deployment workflow supports application start and Ability selection to verify specific entry points on the target device.

What is the best way to verify UI behavior after launching an OpenHarmony app?

The best way to verify UI behavior after launching an OpenHarmony app is by capturing device screenshots. This provides immediate visual confirmation of the runtime state and interface rendering.

Why does hvigorw fail to build my HarmonyOS application in the command line?

hvigorw builds fail when the DevEco Studio toolchain environment is incomplete. Automatic detection of JAVA_HOME, PATH, and SDK locations is required to resolve tool execution errors and compile the HAP correctly.