DebugConfig
Immutable configuration for the Lustro debug runtime.
A value object (deliberately not a data class, to keep the public surface stable and mirrorable by :lustro-noop). Build instances with builder or use DEFAULT. The dispatch/capture limits (maxConcurrentRequests, requestQueueCapacity, requestTimeoutMs, maxRequestBodyBytes, allowedOrigins, captureBudgetBytes) are enforced by the runtime.
Types
Properties
Extra Origins permitted to call the debug API, on any method; the server's own origin is always allowed (other localhost ports are not). Default empty.
Whether Lustro.start may arm the server in a build that is not marked debuggable. Default false: in such a build start() logs a WARN and returns LustroStatus.DISABLED without binding a socket. Opt in only for builds that ship android:debuggable="false" yet are still internal (QA, dogfood); never for a build that reaches end users.
Base URL for the relative URLs of the Send form when the Network tab sends through a senderClient, or null. A sender from OkHttpSender.create has its own base URL instead. Default null.
The address to bind. Default "127.0.0.1", loopback. Any other address, such as "0.0.0.0", makes the server reachable from the network, where the token travels as plain HTTP. The server then makes a new token each time the app's process starts.
Whether to fall back to an ephemeral port when serverPort is taken. Default false: the server then tries serverPort again for 10 s while the app is in the foreground, and else does not start until the next foreground.
Total in-memory capture budget in bytes: the captured bodies the Network tab keeps, counted as kept. A body that isn't kept, such as a media download, costs nothing. Past the budget the oldest finished transactions go first. Default 50 MB.
Maximum bytes captured per request/response body, and per WebSocket message. Default 256 KB.
Maximum number of retained transactions (ring cap). Default 1000.
Maximum number of retained WebSocket connections. Default 100.
Maximum concurrent in-flight requests. Default 16. A request that times out keeps its slot until its handler returns.
Maximum accepted request body size; larger requests get a 413. Default 1 MB.
Maximum number of messages and lifecycle events retained per WebSocket connection. Default 1000.
Bounded request queue capacity. Default 64. A queued request waits at most requestTimeoutMs for a slot, then gets a 503. The server also keeps at most maxConcurrentRequests + requestQueueCapacity + 16 connections open and closes any past that without a response.
Per-request timeout in milliseconds. Default 30000. A request that runs longer gets a 504 and is cancelled; see DebugRequest.onCancel.
The TCP port the debug server binds to. Default 8080.
Total in-memory budget for WebSocket message payloads, in bytes. Default 16 MB.