DevServerHelper

open 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

Constructors

Link copied to clipboard
constructor(developerSettings: DeveloperSettings, applicationContext: Context, packagerConnectionSettings: PackagerConnectionSettings)

Types

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun disableDebugger()
Link copied to clipboard
open fun downloadBundleFromURL(callback: DevBundleDownloadListener, outputFile: File, bundleURL: String, @Nullable bundleInfo: BundleDownloader.BundleInfo)
open fun downloadBundleFromURL(callback: DevBundleDownloadListener, outputFile: File, bundleURL: String, @Nullable bundleInfo: BundleDownloader.BundleInfo, requestBuilder: Request.Builder)
Link copied to clipboard
open fun downloadBundleResourceFromUrlSync(resourcePath: String, outputFile: File): File
This is a debug-only utility to allow fetching a file via packager.
Link copied to clipboard
open fun getDevServerBundleURL(jsModulePath: String): String
Link copied to clipboard
open fun getDevServerSplitBundleURL(jsModulePath: String): String
Link copied to clipboard
open fun getSourceMapUrl(mainModuleName: String): String
Link copied to clipboard
open fun getSourceUrl(mainModuleName: String): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun openDebugger(@Nullable context: ReactContext, errorMessage: String)
Attempt to open the JS debugger on the host machine (on-device CDP debugging).
Link copied to clipboard
Link copied to clipboard