Skip to content

Commit b1bb0be

Browse files
motiz88facebook-github-bot
authored andcommitted
Align debugger Chrome launch flags with Meta-internal version (#44180)
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
1 parent d7f28b3 commit b1bb0be

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/dev-middleware/src/utils/DefaultBrowserLauncher.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,23 @@ const DefaultBrowserLauncher: BrowserLauncher = {
5151
`react-native-debugger-frontend-${browserType}`,
5252
);
5353
const launchedChrome = await ChromeLauncher.launch({
54-
chromePath,
5554
chromeFlags: [
55+
...ChromeLauncher.Launcher.defaultFlags().filter(
56+
/**
57+
* This flag controls whether Chrome treats a visually covered (occluded) tab
58+
* as "backgrounded". We launch CDT as a single tab/window via `--app`, so we
59+
* do want Chrome to treat our tab as "backgrounded" when the UI is covered.
60+
* Omitting this flag allows "visibilitychange" events to fire properly.
61+
*/
62+
flag => flag !== '--disable-backgrounding-occluded-windows',
63+
),
5664
`--app=${url}`,
5765
`--user-data-dir=${userDataDir}`,
5866
'--window-size=1200,600',
67+
'--guest',
5968
],
69+
chromePath,
70+
ignoreDefaultFlags: true,
6071
});
6172

6273
return {

0 commit comments

Comments
 (0)