mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove "Debug with Nuclide" option
Summary: This is no longer needed. Reviewed By: cpojer Differential Revision: D20722274 fbshipit-source-id: 5bc3104e90811d724f42aadbf137ab8eff718ca0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7007df6198
commit
011eb4cea5
@@ -7,13 +7,10 @@
|
||||
|
||||
package com.facebook.react.devsupport;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.R;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener;
|
||||
import com.facebook.react.devsupport.interfaces.PackagerStatusCallback;
|
||||
@@ -250,36 +247,6 @@ public class DevServerHelper {
|
||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
||||
public void attachDebugger(final Context context, final String title) {
|
||||
new AsyncTask<Void, String, Boolean>() {
|
||||
@Override
|
||||
protected Boolean doInBackground(Void... ignore) {
|
||||
return doSync();
|
||||
}
|
||||
|
||||
public boolean doSync() {
|
||||
try {
|
||||
String attachToNuclideUrl = getInspectorAttachUrl(context, title);
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
Request request = new Request.Builder().url(attachToNuclideUrl).build();
|
||||
client.newCall(request).execute();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
FLog.e(ReactConstants.TAG, "Failed to send attach request to Inspector", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Boolean result) {
|
||||
if (!result) {
|
||||
String message = context.getString(R.string.catalyst_debug_nuclide_error);
|
||||
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
||||
public void symbolicateStackTrace(
|
||||
Iterable<StackFrame> stackFrames, final SymbolicationListener listener) {
|
||||
try {
|
||||
@@ -370,16 +337,6 @@ public class DevServerHelper {
|
||||
mPackageName);
|
||||
}
|
||||
|
||||
private String getInspectorAttachUrl(Context context, String title) {
|
||||
return String.format(
|
||||
Locale.US,
|
||||
"http://%s/nuclide/attach-debugger-nuclide?title=%s&app=%s&device=%s",
|
||||
AndroidInfoHelpers.getServerHost(context),
|
||||
title,
|
||||
mPackageName,
|
||||
AndroidInfoHelpers.getFriendlyDeviceName());
|
||||
}
|
||||
|
||||
public void downloadBundleFromURL(
|
||||
DevBundleDownloadListener callback,
|
||||
File outputFile,
|
||||
|
||||
+3
-17
@@ -433,13 +433,9 @@ public abstract class DevSupportManagerBase
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mDevSettings.isNuclideJSDebugEnabled()
|
||||
? mDevSettings.isRemoteJSDebugEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_debug_chrome_stop)
|
||||
: mApplicationContext.getString(R.string.catalyst_debug_chrome)
|
||||
: mDevSettings.isRemoteJSDebugEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_debug_stop)
|
||||
: mApplicationContext.getString(R.string.catalyst_debug),
|
||||
mDevSettings.isRemoteJSDebugEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_debug_stop)
|
||||
: mApplicationContext.getString(R.string.catalyst_debug),
|
||||
new DevOptionHandler() {
|
||||
@Override
|
||||
public void onOptionSelected() {
|
||||
@@ -447,16 +443,6 @@ public abstract class DevSupportManagerBase
|
||||
handleReloadJS();
|
||||
}
|
||||
});
|
||||
if (mDevSettings.isNuclideJSDebugEnabled()) {
|
||||
options.put(
|
||||
mApplicationContext.getString(R.string.catalyst_debug_nuclide),
|
||||
new DevOptionHandler() {
|
||||
@Override
|
||||
public void onOptionSelected() {
|
||||
mDevServerHelper.attachDebugger(mApplicationContext, "ReactNative");
|
||||
}
|
||||
});
|
||||
}
|
||||
options.put(
|
||||
mApplicationContext.getString(R.string.catalyst_change_bundle_location),
|
||||
new DevOptionHandler() {
|
||||
|
||||
Reference in New Issue
Block a user