You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d43b18d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/commands/schema/cli-help-react-native.ts
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -66,12 +66,11 @@ CDP memory routing:
66
66
Use perf memory sample or perf memory snapshot for native/process memory; use cdp only for JavaScript heap evidence.
67
67
68
68
Stale state:
69
-
If a wrong or stale value may come from app state or storage, read the value. Do not navigate the UI to infer it.
70
-
Read JS state through Metro with help cdp. It owns the runtime eval command shape and which globals the expression can reach.
71
-
Stored AsyncStorage files are a fallback for debuggable builds on a local simulator or emulator only. They need host shell access, so they do not work on a remote lease. Use help cdp there.
72
-
iOS simulator, AsyncStorage 1.x/2.x layout: Library/Application Support/<bundle-id>/RCTAsyncLocalStorage_V1 under the data container from xcrun simctl get_app_container <udid> <bundle-id> data.
73
-
Android, AsyncStorage 1.x/2.x layout: databases/RKStorage through adb shell run-as <package>. run-as needs a debuggable package.
74
-
If those files are missing, the app may use a newer store (AsyncStorage 3.x uses SQLite). Do not conclude the value is absent; read it through help cdp instead.
69
+
If a wrong or stale value may come from app state or storage, read the value. Do not navigate the UI to infer it. Read JS values with help cdp (runtime eval).
70
+
Fallback for debuggable builds on a local simulator or emulator, not a remote lease: read the AsyncStorage 1.x/2.x files.
71
+
iOS: Library/Application Support/<bundle-id>/RCTAsyncLocalStorage_V1 in xcrun simctl get_app_container <udid> <bundle-id> data
72
+
Android: databases/RKStorage through adb shell run-as <package>
73
+
Missing files can mean a newer store (AsyncStorage 3.x). Do not conclude that the value is absent.
75
74
76
75
Slow-flow investigation:
77
76
Keep one session, open the app first, and snapshot -i before interacting.
Copy file name to clipboardExpand all lines: src/commands/schema/cli-help.ts
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -362,9 +362,8 @@ Recommended subset:
362
362
Avoid cdp profile cpu, trace, network, and console by default because agent-device already has perf cpu, trace, network, logs, and react-devtools guidance for those areas.
363
363
364
364
Runtime eval:
365
-
Read a JS value after cdp target select. This route does not depend on the host shell, the storage layout, or the app being local:
--expr runs in the selected target's JS global scope. It reaches only values the app exposes there. Module imports, including AsyncStorage, are not globals unless the app exposes them. If the expression cannot reach the value, report that. Do not guess.
365
+
After cdp target select, read a JS value: agent-device cdp runtime eval --expr '<expression>' --await
366
+
--expr reaches only globals the app exposes. Module imports, such as AsyncStorage, are not globals. If it cannot reach the value, report that. Do not guess.
368
367
369
368
Output contract:
370
369
Until cdp has a compact leak report command, synthesize one from memory usage diff, snapshot diff, leak-triplet, and retainers. Report heap deltas, top retained classes/shapes, leak-triplet rows that stayed high after cleanup, and the shortest useful retaining paths. Do not paste raw heap snapshots or large allocation profiles into the response; use exported artifacts only when the user asks for raw data.
0 commit comments