Konfigürasyon

Network agent seçenekleri

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 seçenekleri

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 — Redux / Zustand / her store'u incele

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 seçenekleri

Plugin sadece expo.plugins'de listelendiğinde çalışır. iOS kullanım açıklamasını özelleştirmek için:

json
{
  "expo": {
    "plugins": [
      [
        "rexpo-debugger",
        {
          "iosLocalNetworkUsageDescription": "Used by our internal debugger to discover this device on the dev network."
        }
      ]
    ]
  }
}
SeçenekVarsayılanAçıklama
iosLocalNetworkUsageDescriptionGenel bir dev-only metinNSLocalNetworkUsageDescription Info.plist değerini geçersiz kıl
forcefalseEAS_BUILD_PROFILE === "production" olsa bile izinleri enjekte et. Önerilmez.