DevToolsConfig
data class DevToolsConfig(val serverUrl: String? = null, val enabled: Boolean = true, val autoConnect: Boolean = true, val autoReconnect: Boolean = true, val allowActionCapture: Boolean = true, val allowStateCapture: Boolean = true, val defaultRole: ClientRole? = null, val allowRemoteRequests: Boolean = true)(source)
Configuration for the DevTools service.
Client identity (clientId, clientName, platform) comes from the tooling module's IntrospectionConfig, so it never needs to be repeated here.
Example usage:
val config = DevToolsConfig(
serverUrl = "ws://192.168.1.100:8080/ws",
defaultRole = ClientRole.PUBLISHER
)Content copied to clipboard
Example usage for manual connection timing:
val config = DevToolsConfig(
serverUrl = "ws://192.168.1.100:8080/ws",
autoConnect = false
)
// Later, from a debug menu:
dispatch(ToolingAction.ServiceCommand("devtools", "connect", mapOf("role" to "PUBLISHER")))Content copied to clipboard
Parameters
serverUrl
WebSocket server URL. Null means no connection until connect is called with a URL
enabled
Enable/disable DevTools functionality
autoConnect
Connect on service start when true; wait for an explicit connect when false
allowActionCapture
Allow sending dispatched actions to the DevTools server
allowStateCapture
Allow sending state changes to the DevTools server
defaultRole
The role to request automatically on connect. Null means no auto-request.