Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/dev-middleware/src/inspector-proxy/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ export type TargetCapabilityFlags = $ReadOnly<{
* In the proxy, this disables intercepting and storing network requests.
*/
nativeNetworkInspection?: boolean,

/**
* The target supports the modern `rn_fusebox.html` entry point.
*
* In the launch flow, this controls the Chrome DevTools entrypoint that is used.
*/
prefersFuseboxFrontend?: boolean,
}>;

// Page information received from the device. New page is created for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export default function openDebuggerMiddleware({
return;
}

const useFuseboxEntryPoint =
target.reactNative.capabilities?.prefersFuseboxFrontend;

try {
switch (launchType) {
case 'launch':
Expand All @@ -122,6 +125,7 @@ export default function openDebuggerMiddleware({
experiments,
target.webSocketDebuggerUrl,
serverBaseUrl,
{useFuseboxEntryPoint},
),
),
);
Expand All @@ -133,7 +137,7 @@ export default function openDebuggerMiddleware({
experiments,
target.webSocketDebuggerUrl,
serverBaseUrl,
{relative: true},
{relative: true, useFuseboxEntryPoint},
),
});
res.end();
Expand Down
6 changes: 5 additions & 1 deletion packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function getDevToolsFrontendUrl(
devServerUrl: string,
options?: $ReadOnly<{
relative?: boolean,
useFuseboxEntryPoint?: boolean,
}>,
): string {
const wsParam = getWsParam({
Expand All @@ -29,7 +30,10 @@ export default function getDevToolsFrontendUrl(

const appUrl =
(options?.relative === true ? '' : devServerUrl) +
'/debugger-frontend/rn_inspector.html';
'/debugger-frontend/' +
(options?.useFuseboxEntryPoint === true
? 'rn_fusebox.html'
: 'rn_inspector.html');

const searchParams = new URLSearchParams([
[wsParam.key, wsParam.value],
Expand Down