Skip to content

rn-debugger

The debugger agent diagnoses crashes, blank screens, wrong data, frozen UI, and other broken behavior in a running React Native app. It gathers structured evidence from all available layers before applying minimal fixes.

PropertyValue
ModelOpus
ColorRed
Skillsrn-device-control, rn-testing, rn-debugging
ToolsBash, Read, Write, Edit, Glob, Grep, all MCP CDP/device tools
  • “I see a RedBox error on the simulator”
  • “the screen is blank after navigating to the profile tab”
  • “the app froze and nothing responds to taps”
  • /debug-screen command

Determines bundle ID, iOS binary name, and URI scheme from app.json or native config. These values replace all placeholder commands throughout the protocol.

Captures the current screen state immediately before anything changes.

Connects via cdp_status, then gathers evidence in parallel:

SourceTool
JS errorscdp_error_log
Console errorscdp_console_log(level="error")
Network requestscdp_network_log
Current routecdp_navigation_state
Component treecdp_component_tree(filter="<route>", depth=3)
Native UI treedevice_snapshot

Uses the error types matrix to classify the problem:

Error TypeWhere to Look
JS runtime errorcdp_error_log
Unhandled promise rejectioncdp_error_log
RedBox overlaycdp_component_tree (APP_HAS_REDBOX)
console.error()cdp_console_log(level="error")
Native crash (iOS)collect_logs(sources=["native_ios"])
Native crash (Android)collect_logs(sources=["native_android"])
Metro bundle errorcurl localhost:8081/status
Network failurecdp_network_log (status=0)

If CDP shows no errors but the app is broken, the problem is native.

Follows different investigation paths depending on the error type:

  • RedBox: reads error log stack trace, locates the source line
  • Blank screen: checks fiber roots, native logs, Metro status
  • Wrong data: inspects store state, network responses, component props
  • Wrong navigation: compares current route vs expected
  • Frozen app: checks if debugger is paused, tests JS thread responsiveness

Reads relevant source files, applies the minimal targeted fix. Fast Refresh applies automatically. Falls back to cdp_reload(full=true) if needed.

Confirms the fix by checking cdp_status (no errors, no RedBox), taking a new screenshot, verifying cdp_error_log is clear, and re-running the failing action via Maestro.

  • Never changes git state
  • Retry budget: after 3 failures of the same diagnostic step, stops and reports the blocker
  • Always gathers evidence before fixing (Step 2 before reading source files)