arkweb-app-debug_skill

This skill helps you debug HarmonyOS ArkWeb apps by automating DevTools setup, port forwarding, and webview inspection.
  • Python

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openharmonyinsight/openharmony-skills --skill arkweb-app-debug

  • SKILL.md6.8 KB

Overview

This skill debugs HarmonyOS ArkWeb (webview) applications by connecting Chrome DevTools to running apps via the hdc tool. It automatically detects project configuration, device connection, and webview debugging sockets, then sets up port forwarding and opens DevTools for inspection. The skill integrates with a build/install workflow to provide a complete debug loop for ArkWeb development.

How this skill works

The debug scripts locate DevEco Studio or hdc, find the HarmonyOS project root and package configuration, and use hdc to connect to the device. They search for the webview_devtools socket, create a port forward to localhost:9222, and launch Chrome DevTools or return the DevTools URL. The scripts handle timing and retries (waits after app start, retries socket discovery) and expose the hdc commands used so you can verify actions.

When to use it

  • Start an interactive debugging session for an ArkWeb webview
  • Connect Chrome DevTools to a HarmonyOS app to inspect DOM, console, and network
  • Troubleshoot inability to attach DevTools or missing webview sockets
  • Run automated webview tests through Chrome DevTools MCP
  • Manage port forwarding and multiple debugging sessions across devices

Best practices

  • Enable web debugging early in aboutToAppear() with WebviewController.setWebDebuggingAccess(true)
  • Build and install the app first, then start the debug script from the project root
  • Verify hdc is available and device shows in hdc list targets before running scripts
  • Wait 10–15 seconds after launching the app for the webview socket to appear
  • Inspect the printed hdc commands and forwarded port to diagnose connection issues

Example use cases

  • Open DevTools to inspect and live-edit a page rendered in an ArkWeb webview
  • Capture network requests from the webview to troubleshoot failing API calls
  • Use Chrome DevTools MCP to automate form submission and verify UI flows
  • Recover from a stuck debug session by listing forwarded ports and restarting forwarding
  • Validate that setWebDebuggingAccess(true) is called and the socket becomes available

FAQ

Check that the script printed a localhost:9222 URL, verify the forwarded port is free, and open the URL manually in Chrome/Chromium.

Socket not found—what should I check?

Ensure the app enabled web debugging, wait 10–15s after app start, confirm the Web component rendered, and verify the app process is running via hdc shell ps.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational