-
public class DevServerHelper
Helper class for all things about the debug server running in the engineer's host machine.
One can use 'debug_http_host' shared preferences key to provide a host name for the debug server. If the setting is empty we support and detect two basic configuration that works well for android emulators connection to debug server running on emulator's host:
- Android stock emulator with standard non-configurable local loopback alias: 10.0.2.2
- Genymotion emulator with default settings: 10.0.3.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
DevServerHelper.OnServerContentChangeListener
public interface
DevServerHelper.PackagerCommandListener
public interface
DevServerHelper.PackagerCustomCommandProvider
public interface
DevServerHelper.SymbolicationListener
-
Field Summary
Fields Modifier and Type Field Description public final static String
RELOAD_APP_EXTRA_JS_PROXY
-
Constructor Summary
Constructors Constructor Description DevServerHelper(DevInternalSettings settings, String packageName, InspectorPackagerConnection.BundleStatusProvider bundleStatusProvider)
-
Method Summary
-
-
Constructor Detail
-
DevServerHelper
DevServerHelper(DevInternalSettings settings, String packageName, InspectorPackagerConnection.BundleStatusProvider bundleStatusProvider)
-
-
Method Detail
-
openPackagerConnection
void openPackagerConnection(String clientId, DevServerHelper.PackagerCommandListener commandListener)
-
closePackagerConnection
void closePackagerConnection()
-
openInspectorConnection
void openInspectorConnection()
-
disableDebugger
void disableDebugger()
-
closeInspectorConnection
void closeInspectorConnection()
-
openUrl
void openUrl(ReactContext context, String url, String errorMessage)
-
symbolicateStackTrace
void symbolicateStackTrace(Iterable<StackFrame> stackFrames, DevServerHelper.SymbolicationListener listener)
-
openStackFrameCall
void openStackFrameCall(StackFrame stackFrame)
-
getWebsocketProxyURL
String getWebsocketProxyURL()
-
downloadBundleFromURL
void downloadBundleFromURL(DevBundleDownloadListener callback, File outputFile, String bundleURL, BundleDownloader.BundleInfo bundleInfo)
-
downloadBundleFromURL
void downloadBundleFromURL(DevBundleDownloadListener callback, File outputFile, String bundleURL, BundleDownloader.BundleInfo bundleInfo, Request.Builder requestBuilder)
-
getDevServerBundleURL
String getDevServerBundleURL(String jsModulePath)
-
getDevServerSplitBundleURL
String getDevServerSplitBundleURL(String jsModulePath)
-
isPackagerRunning
void isPackagerRunning(PackagerStatusCallback callback)
-
launchJSDevtools
void launchJSDevtools()
-
getSourceMapUrl
String getSourceMapUrl(String mainModuleName)
-
getSourceUrl
String getSourceUrl(String mainModuleName)
-
getJSBundleURLForRemoteDebugging
String getJSBundleURLForRemoteDebugging(String mainModuleName)
-
downloadBundleResourceFromUrlSync
@Nullable() File downloadBundleResourceFromUrlSync(String resourcePath, File outputFile)
This is a debug-only utility to allow fetching a file via packager. It's made synchronous forsimplicity, but should only be used if it's absolutely necessary.
-
-
-
-