-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(dev-middleware): add enableNetworkInspector
experiment
#41787
feature(dev-middleware): add enableNetworkInspector
experiment
#41787
Conversation
By setting this inside the `experiments`, we can enable/disable network related CDP handlers within the proxy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Which CDP events does this enable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 facebookexperimental/rn-chrome-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
…ebook#41787) Summary: This enables the network panel/inspector by passing the `unstable_enableNetworkPanel=true` to the React Native JS Inspector. (See facebookexperimental/rn-chrome-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: facebook#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=true
to the React Native JS Inspector. (See facebookexperimental/rn-chrome-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 proxyTest Plan:
TBD, will provide a repository using an Expo canary / RN 0.73.0-rc release.