Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

debugging-capacitor

БесплатноБез исполняемых скриптовНе проверен

Diagnoses and fixes runtime bugs in Capacitor iOS/Android apps - white/blank screen on launch, startup crashes, `"X" plugin is not implemented on…

Cap-goот Cap-go★ 79 звёзд на GitHub

Об этом скилле

Debugging Capacitor Apps

Find which layer is broken (web, bridge, native, OS config), prove it with the right inspector, then fix the smallest thing.

When to Use

TRIGGER when:

  • App shows a white/blank screen, crashes on launch, or freezes after a native call.
  • Error "<Name>" plugin is not implemented on ios|android or "<Name>.<method>()" is not implemented on ....
  • Network calls fail on device only: net::ERR_CLEARTEXT_NOT_PERMITTED, ATS "requires the use of a secure connection", CORS errors.
  • Permission prompts never appear or always deny.
  • Live reload (cap run --url, server.url) shows a blank page or "Webpage not available".
  • After updating to Capacitor 8.5+ / Xcode 27: appUrlOpen silent, universal links open the app but do nothing, JS pause/resume or custom AppDelegate code no longer runs.
  • User asks "how do I debug / inspect my Capacitor app".

Do not use:

  • Only need to stream, filter, or save logs or crash reports -> ios-android-logs.
  • Performing the AppDelegate -> SceneDelegate migration itself -> capacitor-uiscene-migration.
  • Setting up deep links, AASA, assetlinks from scratch -> capacitor-deep-linking.
  • Jank, slow startup, bundle size, memory tuning -> capacitor-performance.
  • Sentry / Crashlytics / Datadog in production -> capacitor-native-observability.
  • Writing unit/E2E tests -> capacitor-testing. AI/MCP device automation -> capacitor-mcp.
  • Gradle/Xcode build failures from version bumps -> capacitor-app-upgrades; Pods/SPM resolution -> cocoapods-to-spm.
  • Push token/delivery issues -> capacitor-push-notifications; keyboard overlap -> capacitor-keyboard; notch/insets -> safe-area-handling.

Triage Workflow

  1. Collect facts before touching code: platform(s), simulator vs device, debug vs release, Capacitor version (npx cap doctor), what changed last (upgrade, plugin added, config edit), exact error text.
  2. Classify the layer:
    • JS exception, failed fetch, bad route -> web layer: open the WebView inspector (Safari / chrome://inspect). See references/webview-inspection.md.
    • plugin is not implemented -> bridge/registration: the native code is not in the binary or JS cannot be injected. See Error Handling below.
    • Process dies / EXC_BAD_ACCESS / FATAL EXCEPTION -> native layer: run from Xcode / Android Studio with the debugger attached. See references/native-debugging.md.
    • Works on Android but not iOS after 8.5/Xcode 27, link/lifecycle related -> UIScene. See references/uiscene-regressions.md.
  3. Reproduce with a fresh sync: npm run build && npx cap sync then rebuild native. Stale public/ assets and un-synced plugins cause most "works in browser, broken on device" reports.
  4. Read the native console for Capacitor's own messages. iOS prints ⚡️ Loading app at ..., ⚡️ [log] - ..., ⚡️ ERROR: Unable to load ... to stdout (visible in Xcode's console, simctl launch --console-pty, devicectl ... launch --console; not in Console.app). Android logs under tag Capacitor and JS console under Capacitor/Console. Log commands live in ios-android-logs.
  5. Report the root cause and proposed fix to the user before invasive changes (deleting ios//android/, editing project.pbxproj, disabling ATS globally).
  6. Apply the fix, then run the Verification steps.

Tool Matrix

Need iOS Android
Inspect DOM/JS/network Safari > Develop > device > app chrome://inspect/#devices
Native breakpoints Xcode (npx cap open ios), LLDB Android Studio debugger (npx cap open android)
Run on target from CLI npx cap run ios --target <id> npx cap run android --target <id>
List targets npx cap run ios --list npx cap run android --list
Open URL / deep link xcrun simctl openurl booted <url>; device: xcrun devicectl device process openURL --device <id> <url> adb shell am start -W -a android.intent.action.VIEW -d "<url>" <appId>
Reset/grant permissions (sim) xcrun simctl privacy booted reset all <appId> adb shell pm revoke <appId> android.permission.CAMERA / adb shell pm clear <appId>
Fake push (sim) xcrun simctl push booted <appId> payload.json send a real FCM message
Launch with stdout xcrun simctl launch --console-pty booted <appId>; device: xcrun devicectl device process launch --console --device <id> <appId> adb logcat
Profile Instruments / xcrun xctrace record --template 'Time Profiler' Android Studio Profiler

Details and caveats: references/device-cli.md.

Live Reload Quick Path

  • Capacitor 9 (@next): npx cap run ios --url http://192.168.1.68:5173. The old -l/--live-reload, --host, --port, --https flags are removed.
  • Capacitor 8.5 (stable): npx cap run ios -l --host 192.168.1.68 --port 5173 (add --https for an https dev server).
  • Android emulator/USB: --forwardPorts 5173:5173 runs adb reverse so http://localhost:5173 works.
  • Dev
Полный SKILL.md на GitHub

Установить debugging-capacitor в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.jsonreferences/common-failures.mdreferences/device-cli.mdreferences/native-debugging.mdreferences/uiscene-regressions.mdreferences/webview-inspection.md

FAQ

Что делает скилл debugging-capacitor?

Diagnoses and fixes runtime bugs in Capacitor iOS/Android apps - white/blank screen on launch, startup crashes, `"X" plugin is not implemented on ios/android`, `net::ERR_CLEARTEXT_NOT_PERMITTED`, App Transport Security blocks, CORS on capacitor://localhost, permission denials, live reload not connecting, and Capacitor 8.5+ UIScene regressions (appUrlOpen, universal links, pause/resume silent because AppDelegate callbacks stopped). Covers Safari Web Inspector, chrome://inspect, Xcode/LLDB, Android Studio, `npx cap run --url` (Capacitor 9) vs `-l --host` (8), `xcrun simctl openurl|privacy|push`, `xcrun devicectl device process launch|openURL`, `xctrace`. Do not use for only reading device logs (ios-android-logs), the UIScene migration itself (capacitor-uiscene-migration), deep-link setup (capacitor-deep-linking), speed (capacitor-performance), crash SDKs (capacitor-native-observability), tests (capacitor-testing), or upgrades/build errors (capacitor-app-upgrades, cocoapods-to-spm).

Как установить скилл debugging-capacitor?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл debugging-capacitor запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить debugging-capacitor с