# Debug App

Diagnose Power Apps mobile install/startup failures, npm run dev errors, missing...

- Repository: https://github.com/microsoft/power-platform-skills (1098 stars)
- Category: Business
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add microsoft/power-platform-skills --skill debug-app -g -a claude-code -y`
Codex: `npx skills add microsoft/power-platform-skills --skill debug-app -g -a codex -y`
Cursor: `npx skills add microsoft/power-platform-skills --skill debug-app -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/power-platform-skills --skill debug-app -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add microsoft/power-platform-skills`

## Description

Diagnose Power Apps mobile install/startup failures, npm run dev errors, missing package entry points, or QR/device-opening problems even before an app is loaded. Inspect locally first; restore locked dependencies or restart Metro only with explicit approval, never upgrade packages or patch host/MSAL source. For a running native app, monitor sanitized project-local Metro logs and diagnose runtime errors or silent failures such as empty lists and blank screens. Supports startup-only diagnosis, symptoms, port/platform filters, bounded monitoring, and non-mutating --no-fix mode. Verify the original symptom, not merely installation or quiet logs.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

> **Plugin check**: Run `node "${PLUGIN_ROOT}/scripts/check-version.js"` - if it outputs a message, show it to the user before proceeding.

**📋 Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)**, read first.

Startup diagnosis uses the targeted compatibility inspection below instead of
the shared blanket version check; missing dependencies must not prevent diagnosis.
It does not check for updates. Explicit startup repair/restart approval overrides
shared auto-proceed/default-answer guidance.

# Debug App, Monitor & Fix

Monitor the running app through the project-local `.powernative/metro-logs/` files written by `metro.config.js`, detect runtime and bundle errors, and fix them autonomously by editing the affected files (or routing to the right skill when the fix belongs in a domain like Dataverse schema or auth registration). For silent failures, inject temporary `console.log` statements at data-path boundaries, read only newly appended log bytes, then clean the traces after the root cause is fixed. Modeled on the upstream `app-debugger.agent.md` pattern, foreground loop, bounded polling, configurable clean-check/timeout exits, and optional watch-only operation.

When setup/startup or device opening is failing, first execute
[startup-diagnostics.md](references/startup-diagnostics.md). This bounded phase
can run without Metro logs or a loaded app and returns to the runtime path only
when its prerequisites actually hold. Running `npm run dev` alone does not
activate an agent, and this skill installs no background watcher.

The rest: https://github.com/microsoft/power-platform-skills/blob/HEAD/plugins/mobile-apps/skills/debug-app/SKILL.md
