Skip to content

Commit

Permalink
Remove "Open Debugger" action under JSC (#41535)
Browse files Browse the repository at this point in the history
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 (#36754).

## This diff

Follows D46187942 — this option wasn't correctly removed for Android when running JSC. This is now consistent with iOS.

Changelog:
[Android][Changed] "Open Debugger" is no longer available for remote JS debugging from the Dev Menu (non-Hermes). Please use `NativeDevSettings.setIsDebuggingRemotely()`.

Reviewed By: blakef

Differential Revision: D50555095
  • Loading branch information
huntie authored and facebook-github-bot committed Nov 17, 2023
1 parent f4d006a commit 7bebfc9
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
() ->
Expand Down

0 comments on commit 7bebfc9

Please sign in to comment.