From 99077351eda5b38a8b1a5c7d74aeee7d7f77829c Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 19 Oct 2023 05:06:57 -0700 Subject: [PATCH] Remove remote JS debugging (Android) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: ## Context **Remote JS Debugging removal** In React Native 0.73, we have deprecated Remote JS Debugging (execution of JavaScript in a separate V8 process) and also removed the Dev Menu launcher (https://github.com/facebook/react-native/pull/36754). This was motivated primarily by the broken state of this feature — in particular: incompatibility with the New Architecture. Secondly, as the React Native team continues to invest in improving debugging, we want to reduce the surface area of debugging modes that we support. During this year, we reached out to our partners about the impact of removing this feature, and if there was interest in having separate community support for debugging JSC on Android (a limited use case affected by this change). Without strong interest, we concluded that dropping Remote JS Debugging support in core for React Native 0.74 makes sense. We are focusing future debugging efforts into providing a first-class experience for Hermes. Existing alternatives: - [Direct debugging for JSC (Safari, iOS only)](https://reactnative.dev/docs/0.71/debugging#safari-developer-tools). - Direct debugging with Hermes: Flipper, [Chrome (old method)](https://reactnative.dev/docs/0.71/hermes#debugging-js-on-hermes-using-google-chromes-devtools), or via `react-native start --experimental-debugger` (intended future default). ## This diff This removes remaining Remote JS Debugging code on Android. Changelog: [Android][Breaking] Remove remote JS debugging capability (JSC projects) Differential Revision: D50325682 --- .../react/testing/ReactSettingsForTests.java | 8 --- .../facebook/react/ReactInstanceManager.java | 22 ------ .../facebook/react/bridge/JSBundleLoader.java | 15 ---- .../devsupport/BridgeDevSupportManager.java | 71 ++----------------- .../react/devsupport/DevInternalSettings.java | 11 --- .../react/devsupport/DevServerHelper.java | 65 ----------------- .../devsupport/DevSupportManagerBase.java | 32 --------- .../devsupport/DisabledDevSupportManager.java | 8 --- .../devsupport/ReactInstanceDevHelper.java | 4 -- .../interfaces/DevSupportManager.java | 4 -- .../modules/debug/DevSettingsModule.java | 2 +- .../debug/interfaces/DeveloperSettings.java | 6 -- .../runtime/BridgelessDevSupportManager.java | 6 -- 13 files changed, 6 insertions(+), 248 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactSettingsForTests.java b/packages/react-native/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactSettingsForTests.java index 9376aa3493bc55..37ee98c92b80b3 100644 --- a/packages/react-native/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactSettingsForTests.java +++ b/packages/react-native/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactSettingsForTests.java @@ -41,14 +41,6 @@ public boolean isDeviceDebugEnabled() { return false; } - @Override - public boolean isRemoteJSDebugEnabled() { - return false; - } - - @Override - public void setRemoteJSDebugEnabled(boolean remoteJSDebugEnabled) {} - @Override public boolean isStartSamplingProfilerOnInit() { return false; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index 0514faea9b63ab..6962c67d496377 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -57,12 +57,10 @@ import com.facebook.react.bridge.JSExceptionHandler; import com.facebook.react.bridge.JSIModulePackage; import com.facebook.react.bridge.JSIModuleType; -import com.facebook.react.bridge.JavaJSExecutor; import com.facebook.react.bridge.JavaScriptExecutor; import com.facebook.react.bridge.JavaScriptExecutorFactory; import com.facebook.react.bridge.NativeModuleRegistry; import com.facebook.react.bridge.NotThreadSafeBridgeIdleDebugListener; -import com.facebook.react.bridge.ProxyJavaScriptExecutor; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReactCxxErrorHandler; @@ -297,11 +295,6 @@ public static ReactInstanceManagerBuilder builder() { private ReactInstanceDevHelper createDevHelperInterface() { return new ReactInstanceDevHelper() { - @Override - public void onReloadWithJSDebugger(JavaJSExecutor.Factory jsExecutorFactory) { - ReactInstanceManager.this.onReloadWithJSDebugger(jsExecutorFactory); - } - @Override public void onJSBundleLoadedFromServer() { ReactInstanceManager.this.onJSBundleLoadedFromServer(); @@ -448,14 +441,9 @@ public void onPackagerStatusFetched(final boolean packagerIsRunning) { if (packagerIsRunning) { mDevSupportManager.handleReloadJS(); } else if (mDevSupportManager.hasUpToDateJSBundleInCache() - && !devSettings.isRemoteJSDebugEnabled() && !mUseFallbackBundle) { - // If there is a up-to-date bundle downloaded from server, - // with remote JS debugging disabled, always use that. onJSBundleLoadedFromServer(); } else { - // If dev server is down, disable the remote JS debugging. - devSettings.setRemoteJSDebugEnabled(false); recreateReactContextInBackgroundFromBundleLoader(); } }); @@ -1023,16 +1011,6 @@ public String getJsExecutorName() { return mJavaScriptExecutorFactory.toString(); } - @ThreadConfined(UI) - private void onReloadWithJSDebugger(JavaJSExecutor.Factory jsExecutorFactory) { - FLog.d(ReactConstants.TAG, "ReactInstanceManager.onReloadWithJSDebugger()"); - recreateReactContextInBackground( - new ProxyJavaScriptExecutor.Factory(jsExecutorFactory), - JSBundleLoader.createRemoteDebuggerBundleLoader( - mDevSupportManager.getJSBundleURLForRemoteDebugging(), - mDevSupportManager.getSourceUrl())); - } - @ThreadConfined(UI) private void onJSBundleLoadedFromServer() { FLog.d(ReactConstants.TAG, "ReactInstanceManager.onJSBundleLoadedFromServer()"); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JSBundleLoader.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JSBundleLoader.java index 800eeffbdb66f4..bd561403c4a478 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JSBundleLoader.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JSBundleLoader.java @@ -92,21 +92,6 @@ public String loadScript(JSBundleLoaderDelegate delegate) { }; } - /** - * This loader is used when proxy debugging is enabled. In that case there is no point in fetching - * the bundle from device as remote executor will have to do it anyway. - */ - public static JSBundleLoader createRemoteDebuggerBundleLoader( - final String proxySourceURL, final String realSourceURL) { - return new JSBundleLoader() { - @Override - public String loadScript(JSBundleLoaderDelegate delegate) { - delegate.setSourceURLs(realSourceURL, proxySourceURL); - return realSourceURL; - } - }; - } - /** Loads the script, returning the URL of the source it loaded. */ public abstract String loadScript(JSBundleLoaderDelegate delegate); } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java index 79977623cde704..fb0b911399cb0b 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java @@ -16,14 +16,12 @@ import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.CatalystInstance; import com.facebook.react.bridge.JSBundleLoader; -import com.facebook.react.bridge.JavaJSExecutor; import com.facebook.react.bridge.JavaScriptExecutorFactory; import com.facebook.react.bridge.ReactMarker; import com.facebook.react.bridge.ReactMarkerConstants; import com.facebook.react.bridge.UiThreadUtil; import com.facebook.react.common.ReactConstants; import com.facebook.react.common.SurfaceDelegateFactory; -import com.facebook.react.common.futures.SimpleSettableFuture; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.DevLoadingViewManager; import com.facebook.react.devsupport.interfaces.DevOptionHandler; @@ -33,9 +31,6 @@ import java.io.File; import java.io.IOException; import java.util.Map; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; /** * Interface for accessing and interacting with development features. Following features @@ -136,54 +131,6 @@ public void onError(String url, Throwable cause) { }); } - private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback( - final SimpleSettableFuture future) { - return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() { - @Override - public void onSuccess() { - future.set(true); - hideDevLoadingView(); - } - - @Override - public void onFailure(final Throwable cause) { - hideDevLoadingView(); - FLog.e(ReactConstants.TAG, "Failed to connect to debugger!", cause); - future.setException( - new IOException( - getApplicationContext().getString(com.facebook.react.R.string.catalyst_debug_error), - cause)); - } - }; - } - - private void reloadJSInProxyMode() { - // When using js proxy, there is no need to fetch JS bundle as proxy executor will do that - // anyway - getDevServerHelper().launchJSDevtools(); - - JavaJSExecutor.Factory factory = - new JavaJSExecutor.Factory() { - @Override - public JavaJSExecutor create() throws Exception { - WebsocketJavaScriptExecutor executor = new WebsocketJavaScriptExecutor(); - SimpleSettableFuture future = new SimpleSettableFuture<>(); - executor.connect( - getDevServerHelper().getWebsocketProxyURL(), getExecutorConnectCallback(future)); - // TODO(t9349129) Don't use timeout - try { - future.get(90, TimeUnit.SECONDS); - return executor; - } catch (ExecutionException e) { - throw (Exception) e.getCause(); - } catch (InterruptedException | TimeoutException e) { - throw new RuntimeException(e); - } - } - }; - getReactInstanceDevHelper().onReloadWithJSDebugger(factory); - } - @Override public void handleReloadJS() { @@ -196,19 +143,11 @@ public void handleReloadJS() { // dismiss redbox if exists hideRedboxDialog(); - if (getDevSettings().isRemoteJSDebugEnabled()) { - PrinterHolder.getPrinter() - .logMessage(ReactDebugOverlayTags.RN_CORE, "RNCore: load from Proxy"); - showDevLoadingViewForRemoteJSEnabled(); - reloadJSInProxyMode(); - } else { - PrinterHolder.getPrinter() - .logMessage(ReactDebugOverlayTags.RN_CORE, "RNCore: load from Server"); - String bundleURL = - getDevServerHelper() - .getDevServerBundleURL(Assertions.assertNotNull(getJSAppBundleName())); - reloadJSFromServer(bundleURL); - } + PrinterHolder.getPrinter() + .logMessage(ReactDebugOverlayTags.RN_CORE, "RNCore: load from Server"); + String bundleURL = + getDevServerHelper().getDevServerBundleURL(Assertions.assertNotNull(getJSAppBundleName())); + reloadJSFromServer(bundleURL); } /** Starts of stops the sampling profiler */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java index c465e63cb3d5ab..ff2b2a19d48baa 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java @@ -28,7 +28,6 @@ class DevInternalSettings private static final String PREFS_ANIMATIONS_DEBUG_KEY = "animations_debug"; private static final String PREFS_INSPECTOR_DEBUG_KEY = "inspector_debug"; private static final String PREFS_HOT_MODULE_REPLACEMENT_KEY = "hot_module_replacement"; - private static final String PREFS_REMOTE_JS_DEBUG_KEY = "remote_js_debug"; private static final String PREFS_START_SAMPLING_PROFILER_ON_INIT = "start_sampling_profiler_on_init"; @@ -85,16 +84,6 @@ public boolean isDeviceDebugEnabled() { return ReactBuildConfig.DEBUG; } - @Override - public boolean isRemoteJSDebugEnabled() { - return mPreferences.getBoolean(PREFS_REMOTE_JS_DEBUG_KEY, false); - } - - @Override - public void setRemoteJSDebugEnabled(boolean remoteJSDebugEnabled) { - mPreferences.edit().putBoolean(PREFS_REMOTE_JS_DEBUG_KEY, remoteJSDebugEnabled).apply(); - } - @Override public boolean isStartSamplingProfilerOnInit() { return mPreferences.getBoolean(PREFS_START_SAMPLING_PROFILER_ON_INIT, false); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java index d5c427fc67a4b4..325aec70d0d1a3 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java @@ -12,7 +12,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.facebook.common.logging.FLog; -import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.ReactContext; import com.facebook.react.common.ReactConstants; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; @@ -56,8 +55,6 @@ * */ public class DevServerHelper { - public static final String RELOAD_APP_EXTRA_JS_PROXY = "jsproxy"; - private static final int HTTP_CONNECT_TIMEOUT_MS = 5000; private static final String DEBUGGER_MSG_DISABLE = "{ \"id\":1,\"method\":\"Debugger.disable\" }"; @@ -237,13 +234,6 @@ protected Void doInBackground(Void... params) { }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } - public String getWebsocketProxyURL() { - return String.format( - Locale.US, - "ws://%s/debugger-proxy?role=client", - mPackagerConnectionSettings.getDebugServerHost()); - } - private String getInspectorDeviceUrl() { return String.format( Locale.US, @@ -261,28 +251,6 @@ public void downloadBundleFromURL( mBundleDownloader.downloadBundleFromURL(callback, outputFile, bundleURL, bundleInfo); } - public void downloadBundleFromURL( - DevBundleDownloadListener callback, - File outputFile, - String bundleURL, - BundleDownloader.BundleInfo bundleInfo, - Request.Builder requestBuilder) { - mBundleDownloader.downloadBundleFromURL( - callback, outputFile, bundleURL, bundleInfo, requestBuilder); - } - - /** @return the host to use when connecting to the bundle server from the host itself. */ - private String getHostForJSProxy() { - // Use custom port if configured. Note that host stays "localhost". - String host = Assertions.assertNotNull(mPackagerConnectionSettings.getDebugServerHost()); - int portOffset = host.lastIndexOf(':'); - if (portOffset > -1) { - return "localhost" + host.substring(portOffset); - } else { - return AndroidInfoHelpers.DEVICE_LOCALHOST; - } - } - /** @return whether we should enable dev mode when requesting JS bundles. */ private boolean getDevMode() { return mSettings.isJSDevModeEnabled(); @@ -345,32 +313,6 @@ public void isPackagerRunning(final PackagerStatusCallback callback) { } } - private String createLaunchJSDevtoolsCommandUrl() { - return String.format( - Locale.US, - "http://%s/launch-js-devtools", - mPackagerConnectionSettings.getDebugServerHost()); - } - - public void launchJSDevtools() { - Request request = new Request.Builder().url(createLaunchJSDevtoolsCommandUrl()).build(); - mClient - .newCall(request) - .enqueue( - new Callback() { - @Override - public void onFailure(@NonNull Call call, @NonNull IOException e) { - // ignore HTTP call response, this is just to open a debugger page and there is no - // reason to report failures from here - } - - @Override - public void onResponse(@NonNull Call call, @NonNull Response response) { - // ignore HTTP call response - see above - } - }); - } - public String getSourceMapUrl(String mainModuleName) { return createBundleURL(mainModuleName, BundleType.MAP); } @@ -379,13 +321,6 @@ public String getSourceUrl(String mainModuleName) { return createBundleURL(mainModuleName, BundleType.BUNDLE); } - public String getJSBundleURLForRemoteDebugging(String mainModuleName) { - // The host we use when connecting to the JS bundle server from the emulator is not the - // same as the one needed to connect to the same server from the JavaScript proxy running on the - // host itself. - return createBundleURL(mainModuleName, BundleType.BUNDLE, getHostForJSProxy()); - } - /** * This is a debug-only utility to allow fetching a file via packager. It's made synchronous for * simplicity, but should only be used if it's absolutely necessary. diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index 57f0b9ac76fa1f..7ef46484e494e4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -154,12 +154,6 @@ public DevSupportManagerBase( public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (getReloadAppAction(context).equals(action)) { - if (intent.getBooleanExtra(DevServerHelper.RELOAD_APP_EXTRA_JS_PROXY, false)) { - mDevSettings.setRemoteJSDebugEnabled(true); - mDevServerHelper.launchJSDevtools(); - } else { - mDevSettings.setRemoteJSDebugEnabled(false); - } handleReloadJS(); } } @@ -367,13 +361,6 @@ public void onOptionSelected() { if (mDevSettings.isDeviceDebugEnabled()) { // On-device JS debugging (CDP). Render action to open debugger frontend. - - // Reset the old debugger setting so no one gets stuck. - // TODO: Remove in a few weeks. - if (mDevSettings.isRemoteJSDebugEnabled()) { - mDevSettings.setRemoteJSDebugEnabled(false); - handleReloadJS(); - } options.put( mApplicationContext.getString(R.string.catalyst_debug_open), () -> @@ -595,12 +582,6 @@ public String getSourceUrl() { return mDevServerHelper.getSourceUrl(Assertions.assertNotNull(mJSAppBundleName)); } - @Override - public String getJSBundleURLForRemoteDebugging() { - return mDevServerHelper.getJSBundleURLForRemoteDebugging( - Assertions.assertNotNull(mJSAppBundleName)); - } - @Override public String getDownloadedJSBundleFile() { return mJSBundleDownloadedFile.getAbsolutePath(); @@ -966,19 +947,6 @@ public void setHotModuleReplacementEnabled(final boolean isHotModuleReplacementE }); } - @Override - public void setRemoteJSDebugEnabled(final boolean isRemoteJSDebugEnabled) { - if (!mIsDevSupportEnabled) { - return; - } - - UiThreadUtil.runOnUiThread( - () -> { - mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled); - handleReloadJS(); - }); - } - @Override public void setFpsDebugEnabled(final boolean isFpsDebugEnabled) { if (!mIsDevSupportEnabled) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java index 4c965eba4437f5..9bd12462ce189e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java @@ -77,9 +77,6 @@ public void stopInspector() {} @Override public void setHotModuleReplacementEnabled(boolean isHotModuleReplacementEnabled) {} - @Override - public void setRemoteJSDebugEnabled(boolean isRemoteJSDebugEnabled) {} - @Override public void setFpsDebugEnabled(boolean isFpsDebugEnabled) {} @@ -117,11 +114,6 @@ public String getSourceUrl() { return null; } - @Override - public String getJSBundleURLForRemoteDebugging() { - return null; - } - @Override public String getDownloadedJSBundleFile() { return null; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReactInstanceDevHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReactInstanceDevHelper.java index d418c5f14da4ce..b27a935e79397d 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReactInstanceDevHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReactInstanceDevHelper.java @@ -10,7 +10,6 @@ import android.app.Activity; import android.view.View; import androidx.annotation.Nullable; -import com.facebook.react.bridge.JavaJSExecutor; import com.facebook.react.bridge.JavaScriptExecutorFactory; /** @@ -20,9 +19,6 @@ */ public interface ReactInstanceDevHelper { - /** Request react instance recreation with JS debugging enabled. */ - void onReloadWithJSDebugger(JavaJSExecutor.Factory proxyExecutorFactory); - /** Notify react instance manager about new JS bundle version downloaded from the server. */ void onJSBundleLoadedFromServer(); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java index 84c756550cfed8..08c38cfbe81d44 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java @@ -62,8 +62,6 @@ public interface DevSupportManager extends JSExceptionHandler { String getSourceUrl(); - String getJSBundleURLForRemoteDebugging(); - String getDownloadedJSBundleFile(); boolean hasUpToDateJSBundleInCache(); @@ -82,8 +80,6 @@ public interface DevSupportManager extends JSExceptionHandler { void setHotModuleReplacementEnabled(final boolean isHotModuleReplacementEnabled); - void setRemoteJSDebugEnabled(final boolean isRemoteJSDebugEnabled); - void setFpsDebugEnabled(final boolean isFpsDebugEnabled); void toggleElementInspector(); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java index ede03d57abe124..31e54133079643 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java @@ -61,7 +61,7 @@ public void setHotLoadingEnabled(boolean isHotLoadingEnabled) { @Override public void setIsDebuggingRemotely(boolean isDebugginRemotelyEnabled) { - mDevSupportManager.setRemoteJSDebugEnabled(isDebugginRemotelyEnabled); + // Not implemented } @Override diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java index 08a77564d557b0..0a4bb36380efd0 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java @@ -28,12 +28,6 @@ public interface DeveloperSettings { /** @return Whether Nuclide JS debugging is enabled. */ boolean isDeviceDebugEnabled(); - /** @return Whether remote JS debugging is enabled. */ - boolean isRemoteJSDebugEnabled(); - - /** Enable/Disable remote JS debugging. */ - void setRemoteJSDebugEnabled(boolean remoteJSDebugEnabled); - /** @return Whether Start Sampling Profiler on App Start is enabled. */ boolean isStartSamplingProfilerOnInit(); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java index 3627129e9233b8..bcfc8aab60ad8e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java @@ -12,7 +12,6 @@ import android.view.View; import com.facebook.infer.annotation.Nullsafe; import com.facebook.react.bridge.JSBundleLoader; -import com.facebook.react.bridge.JavaJSExecutor; import com.facebook.react.bridge.JavaScriptExecutorFactory; import com.facebook.react.bridge.ReactContext; import com.facebook.react.devsupport.DevSupportManagerBase; @@ -98,11 +97,6 @@ public void handleReloadJS() { private static ReactInstanceDevHelper createInstanceDevHelper(final ReactHostImpl reactHost) { return new ReactInstanceDevHelper() { - @Override - public void onReloadWithJSDebugger(JavaJSExecutor.Factory proxyExecutorFactory) { - // Not implemented - } - @Override public void onJSBundleLoadedFromServer() { throw new IllegalStateException("Not implemented for bridgeless mode");