The shape of the debug context value provided to consumers.

interface DebugContextType {
isDebugEnabled: boolean;
toggleDebug: () => void;
setDebugEnabled: (enabled: boolean) => void;
storageDebuggerEnabled: boolean;
setStorageDebuggerEnabled: (enabled: boolean) => void;
toggleStorageDebugger: () => void;
logViewerEnabled: boolean;
setLogViewerEnabled: (enabled: boolean) => void;
toggleLogViewer: () => void;
stateInspectorEnabled: boolean;
setStateInspectorEnabled: (enabled: boolean) => void;
toggleStateInspector: () => void;
stateInspectorSources: StateInspectorSourceSnapshot[];
registerStateInspector: <T>(
config: StateInspectorRegistration<T>,
) => StateInspectorHandle<T>;
applyStateInspectorUpdate: (id: string, value: unknown) => void;
refreshStateInspectorSource: (id: string) => void;
logEntries: LogEntry[];
clearLogs: () => void;
exportLogs: () => void;
maxLogEntries: number;
}
interface DebugContextType {
    isDebugEnabled: boolean;
    toggleDebug: () => void;
    setDebugEnabled: (enabled: boolean) => void;
    storageDebuggerEnabled: boolean;
    setStorageDebuggerEnabled: (enabled: boolean) => void;
    toggleStorageDebugger: () => void;
    logViewerEnabled: boolean;
    setLogViewerEnabled: (enabled: boolean) => void;
    toggleLogViewer: () => void;
    stateInspectorEnabled: boolean;
    setStateInspectorEnabled: (enabled: boolean) => void;
    toggleStateInspector: () => void;
    stateInspectorSources: StateInspectorSourceSnapshot[];
    registerStateInspector: <T>(
        config: StateInspectorRegistration<T>,
    ) => StateInspectorHandle<T>;
    applyStateInspectorUpdate: (id: string, value: unknown) => void;
    refreshStateInspectorSource: (id: string) => void;
    logEntries: LogEntry[];
    clearLogs: () => void;
    exportLogs: () => void;
    maxLogEntries: number;
}

Properties

isDebugEnabled: boolean

Whether debug mode is currently enabled.

toggleDebug: () => void

Function to toggle debug mode on/off.

setDebugEnabled: (enabled: boolean) => void

Function to explicitly set debug mode state.

storageDebuggerEnabled: boolean
setStorageDebuggerEnabled: (enabled: boolean) => void
toggleStorageDebugger: () => void
logViewerEnabled: boolean

Whether the log viewer panel is available in the debug menu.

setLogViewerEnabled: (enabled: boolean) => void
toggleLogViewer: () => void
stateInspectorEnabled: boolean
setStateInspectorEnabled: (enabled: boolean) => void
toggleStateInspector: () => void
stateInspectorSources: StateInspectorSourceSnapshot[]
registerStateInspector: <T>(
    config: StateInspectorRegistration<T>,
) => StateInspectorHandle<T>
applyStateInspectorUpdate: (id: string, value: unknown) => void
refreshStateInspectorSource: (id: string) => void
logEntries: LogEntry[]

Captured console log entries for inspection.

clearLogs: () => void

Clears captured log entries.

exportLogs: () => void

Exports captured log entries to a JSON file.

maxLogEntries: number