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 2b4e4eabb64a98..e242858a71b2fc 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 @@ -363,15 +363,16 @@ public void onOptionSelected() { } }); - if (mDevSettings.isDeviceDebugEnabled()) { - // On-device JS debugging (CDP). Render action to open debugger frontend. + if (mDevSettings.isRemoteJSDebugEnabled()) { + // [Deprecated in React Native 0.73] Remote JS debugging. Handle reload + // via external JS executor. This capability will be removed in a future + // release. + mDevSettings.setRemoteJSDebugEnabled(false); + handleReloadJS(); + } - // Reset the old debugger setting so no one gets stuck. - // TODO: Remove in a few weeks. - if (mDevSettings.isRemoteJSDebugEnabled()) { - mDevSettings.setRemoteJSDebugEnabled(false); - handleReloadJS(); - } + if (mDevSettings.isDeviceDebugEnabled() && !mDevSettings.isRemoteJSDebugEnabled()) { + // On-device JS debugging (CDP). Render action to open debugger frontend. options.put( mApplicationContext.getString(R.string.catalyst_debug_open), () ->