Skip to content
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

Enable reloading DevTools when running in hosted mode #1

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

motiz88
Copy link

@motiz88 motiz88 commented Oct 20, 2023

Summary

In "hosted mode" (running DevTools as a web page in a browser), the InspectorFrontendHost.reattach() method is a noop, which breaks the "Reload DevTools" action (useful e.g. after changing experiment settings). Here we update the stub implementation to directly call the provided callback, so that reloading works. Conceptually, this is just what DevTools used to do before ChromeDevTools@ab16a95.

Upstreaming plan

This patch can probably be upstreamed to the DevTools repo as-is.

Test plan

  1. Use the sync-and-build script to update the debugger frontend files in React Native.
  2. Launch the frontend, make a settings change that requires reloading, and observe that the "Reload DevTools" button works.
reload.devtools.works.mov

@motiz88 motiz88 merged commit 967f50b into facebookexperimental:main Oct 20, 2023
3 checks passed
@motiz88 motiz88 deleted the enable-web-mode-reloads branch October 20, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants