Skip to content

Commit

Permalink
Align debugger Chrome launch flags with Meta-internal version (#44180)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44180

Changelog: [General][Changed] Update Chrome launch flags for `--experimental-debugger` launch flow

Internally at Meta, we've been testing the experimental debugger launch flow with a different set of Chrome flags than are currently shipped in open source. This diff fixes those differences:

* Removes `--disable-backgrounding-occluded-windows`
* Adds `--guest`

Reviewed By: EdmondChuiHW

Differential Revision: D56418271

fbshipit-source-id: 884c5746e93cad89f17e4ef9e3ef193a2a454eb5
  • Loading branch information
motiz88 authored and facebook-github-bot committed Apr 22, 2024
1 parent d7f28b3 commit b1bb0be
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/dev-middleware/src/utils/DefaultBrowserLauncher.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,23 @@ const DefaultBrowserLauncher: BrowserLauncher = {
`react-native-debugger-frontend-${browserType}`,
);
const launchedChrome = await ChromeLauncher.launch({
chromePath,
chromeFlags: [
...ChromeLauncher.Launcher.defaultFlags().filter(
/**
* This flag controls whether Chrome treats a visually covered (occluded) tab
* as "backgrounded". We launch CDT as a single tab/window via `--app`, so we
* do want Chrome to treat our tab as "backgrounded" when the UI is covered.
* Omitting this flag allows "visibilitychange" events to fire properly.
*/
flag => flag !== '--disable-backgrounding-occluded-windows',
),
`--app=${url}`,
`--user-data-dir=${userDataDir}`,
'--window-size=1200,600',
'--guest',
],
chromePath,
ignoreDefaultFlags: true,
});

return {
Expand Down

0 comments on commit b1bb0be

Please sign in to comment.