feature(dev-middleware): add enableNetworkInspector experiment#41787
feature(dev-middleware): add enableNetworkInspector experiment#41787byCedric wants to merge 3 commits intofacebook:mainfrom
enableNetworkInspector experiment#41787Conversation
By setting this inside the `experiments`, we can enable/disable network related CDP handlers within the proxy.
|
@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
| * Enables the new JS debugger network panel and network CDP events. | ||
| * When disabled, all CDP events and the network panel are disabled. |
There was a problem hiding this comment.
Nit: Which CDP events does this enable?
There was a problem hiding this comment.
Since its missing at the moment, none. But, on Expo's side we can use this to enable/disable two non-trivial CDP events:
Custom Expo(Network.receivedResponseBody)
This event offloads the responses to the inspector proxy when received by the app. When we need to respond to Network.getResponseBody, we need to be able to reply to it. That's not something we could implement on the native side, we can only send from the native side (not receive events).
Because of that, once a user opens the app, all network responses are logged to the CLI process. Meaning that there will be quite a build-up in memory over time, without any event being able to clear this.
Network.getResponseBody
This just pulls the data received earlier from the device, and sends it to the debugger.
Co-authored-by: Moti Zilberman <motiz88@gmail.com>
Co-authored-by: Alex Hunt <hello@alexhunt.io>
|
@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
) Summary: This enables the network panel/inspector by passing the `unstable_enableNetworkPanel=true` to the React Native JS Inspector. (See facebook/react-native-devtools-frontend#2) By setting this inside the `experiments`, we can enable/disable network related CDP handlers within the proxy. ## Changelog: [GENERAL] [ADDED] - Add `enableNetworkInspector` experiment to enable Network panel and CDP handlers in inspector proxy Pull Request resolved: #41787 Test Plan: TBD, will provide a repository using an Expo canary / RN 0.73.0-rc release. Reviewed By: NickGerleman Differential Revision: D51811892 Pulled By: huntie fbshipit-source-id: 541d96b6f0735104a4050a24a152e1158871ed1d
|
How can I activate this feature with version 73.3? |
Summary:
This enables the network panel/inspector by passing the
unstable_enableNetworkPanel=trueto the React Native JS Inspector. (See facebook/react-native-devtools-frontend#2)By setting this inside the
experiments, we can enable/disable network related CDP handlers within the proxy.Changelog:
[GENERAL] [ADDED] - Add
enableNetworkInspectorexperiment to enable Network panel and CDP handlers in inspector proxyTest Plan:
TBD, will provide a repository using an Expo canary / RN 0.73.0-rc release.