From ca2dde5906a3cab74855a3f48b707637ac523cca Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 18 Jan 2024 07:52:51 -0800 Subject: [PATCH] Support launching experimental debugger for modern CDP targets (#42302) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42302 Changelog: [Internal][Added] Support launching experimental debugger frontend for CDP targets marked as "modern" See the definition of "modern" targets in D50967795. Reviewed By: hoxyq Differential Revision: D52786332 fbshipit-source-id: 13718e9ddf3ec050049ef7ec9a77f6cf1a7f82ee --- .../dev-middleware/src/middleware/openDebuggerMiddleware.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js index c2aaded070ab04..b97c7fb42b6d67 100644 --- a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js +++ b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js @@ -62,7 +62,8 @@ export default function openDebuggerMiddleware({ const targets = inspectorProxy.getPageDescriptions().filter( // Only use targets with better reloading support app => - app.title === 'React Native Experimental (Improved Chrome Reloads)', + app.title === 'React Native Experimental (Improved Chrome Reloads)' || + app.reactNative.type === 'Modern', ); let target;