Configuration
Network agent options
typescript
initNetworkAgent({
// WebSocket URL — optional. Omit to use mDNS auto-discovery.
wsUrl: "ws://192.168.1.100:5051",
// Enable/disable agent (default: true)
enabled: true,
// Maximum body snippet length (default: 3000)
maxBodyLength: 3000,
// Enable debug logging (default: false)
debug: false,
// mDNS discovery timeout in ms (default: 10000)
discoveryTimeoutMs: 10000,
});Console agent options
typescript
initConsoleAgent({
// WebSocket URL — optional. Omit to use mDNS auto-discovery.
wsUrl: "ws://192.168.1.100:5051",
// Enable/disable agent (default: true)
enabled: true,
// Enable debug logging (default: false)
debug: false,
// Capture stack traces for errors/warnings (default: true)
captureStackTrace: true,
// mDNS discovery timeout in ms (default: 10000)
discoveryTimeoutMs: 10000,
});State agent — inspect Redux / Zustand / any store
typescript
import {
initStateAgent,
attachZustandStore,
attachReduxStore,
attachStore,
} from "rexpo-debugger";
if (__DEV__) {
initStateAgent({
// WebSocket URL — optional. Omit to use mDNS auto-discovery.
wsUrl: "ws://192.168.1.100:5051",
// Enable/disable agent (default: true)
enabled: true,
// Min gap between snapshots per store, in ms (default: 150)
throttleMs: 150,
// Enable debug logging (default: false)
debug: false,
// mDNS discovery timeout in ms (default: 10000)
discoveryTimeoutMs: 10000,
});
// Zustand — pass the hook returned by create(...)
attachZustandStore(useBearStore, { name: "bears" });
// Redux / Redux Toolkit
attachReduxStore(store, { name: "app" });
// Anything else via the generic adapter (Valtio, MobX, Jotai, XState, Effector…)
attachStore({
name: "valtio",
getState: () => snapshot(state),
subscribe: (cb) => subscribe(state, cb), // must return an unsubscribe fn
});
}Expo config plugin options
The plugin only runs when listed in expo.plugins. To customize the iOS usage description:
json
{
"expo": {
"plugins": [
[
"rexpo-debugger",
{
"iosLocalNetworkUsageDescription": "Used by our internal debugger to discover this device on the dev network."
}
]
]
}
}| Option | Default | Description |
|---|---|---|
| iosLocalNetworkUsageDescription | A generic dev-only string | Override the NSLocalNetworkUsageDescription Info.plist value |
| force | false | Inject permissions even when EAS_BUILD_PROFILE === "production". Not recommended. |