Combined debug context type with both state and action properties. Used by the legacy unified useDebug hook for backward compatibility.

interface DebugContextType
extends DebugStateContextValue,
DebugActionsContextValue {}
interface DebugContextType {
    isDebugEnabled: boolean;
    debugMenuOpen: boolean;
    isStorageDebuggerEnabled: boolean;
    isLogViewerEnabled: boolean;
    isLogRedactionEnabled: boolean;
    isStateInspectorEnabled: boolean;
    stateInspectorSources: StateInspectorSourceSnapshot[];
    isIpcViewerEnabled: boolean;
    isEventLoggerEnabled: boolean;
    isConfidenceTestExporterEnabled: boolean;
    isPerformanceMonitorEnabled: boolean;
    performanceMetrics: PerformanceMetrics;
    currentFPS: number;
    eventLogEntries: DebugEventEntry[];
    maxEventLogEntries: number;
    ipcEvents: IpcLogEntry[];
    maxIpcEntries: number;
    logEntries: LogEntry[];
    maxLogEntries: number;
    toggleDebug: () => void;
    setDebugEnabled: (enabled: boolean) => void;
    openDebugMenu: () => void;
    closeDebugMenu: () => void;
    toggleDebugMenu: () => void;
    setIsStorageDebuggerEnabled: (enabled: boolean) => void;
    toggleStorageDebugger: () => void;
    setIsLogViewerEnabled: (enabled: boolean) => void;
    toggleLogViewer: () => void;
    setIsLogRedactionEnabled: (enabled: boolean) => void;
    toggleLogRedaction: () => void;
    setIsStateInspectorEnabled: (enabled: boolean) => void;
    toggleStateInspector: () => void;
    registerStateInspector: <T>(
        config: StateInspectorRegistration<T>,
    ) => StateInspectorHandle<T>;
    applyStateInspectorUpdate: (id: string, value: unknown) => void;
    refreshStateInspectorSource: (id: string) => void;
    setIsIpcViewerEnabled: (enabled: boolean) => void;
    toggleIpcViewer: () => void;
    setIsEventLoggerEnabled: (enabled: boolean) => void;
    toggleEventLogger: () => void;
    setIsConfidenceTestExporterEnabled: (enabled: boolean) => void;
    toggleConfidenceTestExporter: () => void;
    setIsPerformanceMonitorEnabled: (enabled: boolean) => void;
    togglePerformanceMonitor: () => void;
    recordApiLatency: (
        duration: number,
        success: boolean,
        correlationId?: string,
        provider?: string,
        endpoint?: string,
    ) => void;
    recordCacheAccess: (hit: boolean) => void;
    recordMatchingProgress: (
        current: number,
        total: number,
        elapsedMs: number,
    ) => void;
    updateMemoryStats: (stats: MemoryMetrics) => void;
    resetPerformanceMetrics: () => void;
    exportPerformanceReport: () => Promise<void>;
    recordEvent: (
        entry: DebugEventRecord,
        options?: RecordEventOptions,
    ) => void;
    clearEventLog: () => void;
    clearIpcEvents: () => void;
    clearLogs: () => void;
    exportLogs: () => Promise<void>;
}

Hierarchy (View Summary)

Properties

isDebugEnabled: boolean

Whether debug mode is currently enabled globally.

debugMenuOpen: boolean

Whether the debug menu panel is visible.

isStorageDebuggerEnabled: boolean

Whether the storage inspector feature is enabled.

isLogViewerEnabled: boolean

Whether console log interception and viewing is enabled.

isLogRedactionEnabled: boolean

Whether sensitive log content is redacted in logs.

isStateInspectorEnabled: boolean

Whether state inspection and time-travel debugging is enabled.

stateInspectorSources: StateInspectorSourceSnapshot[]

Array of registered state inspector sources for inspection.

isIpcViewerEnabled: boolean

Whether IPC communication tracking is enabled.

isEventLoggerEnabled: boolean

Whether debug event logging is enabled.

isConfidenceTestExporterEnabled: boolean

Whether confidence test export feature is enabled.

isPerformanceMonitorEnabled: boolean

Whether performance metrics collection is enabled.

performanceMetrics: PerformanceMetrics

Current performance metrics (API latency, cache stats, etc.).

currentFPS: number
eventLogEntries: DebugEventEntry[]

Array of recorded debug events.

maxEventLogEntries: number

Maximum number of event log entries retained.

ipcEvents: IpcLogEntry[]

Array of tracked IPC communication events.

maxIpcEntries: number

Maximum number of IPC entries retained.

logEntries: LogEntry[]

Array of intercepted console log entries.

maxLogEntries: number

Maximum number of log entries retained.

toggleDebug: () => void

Toggles debug mode between enabled/disabled.

setDebugEnabled: (enabled: boolean) => void

Explicitly sets debug mode enabled/disabled state.

openDebugMenu: () => void

Opens the debug menu UI panel.

closeDebugMenu: () => void

Closes the debug menu UI panel.

toggleDebugMenu: () => void

Toggles debug menu visibility.

setIsStorageDebuggerEnabled: (enabled: boolean) => void

Enables/disables storage inspector feature.

toggleStorageDebugger: () => void

Toggles storage debugger feature.

setIsLogViewerEnabled: (enabled: boolean) => void

Enables/disables console log interception and viewing.

toggleLogViewer: () => void

Toggles log viewer feature.

setIsLogRedactionEnabled: (enabled: boolean) => void

Enables/disables log content redaction for sensitive data.

toggleLogRedaction: () => void

Toggles log redaction feature.

setIsStateInspectorEnabled: (enabled: boolean) => void

Enables/disables state inspection and time-travel debugging.

toggleStateInspector: () => void

Toggles state inspector feature.

registerStateInspector: <T>(
    config: StateInspectorRegistration<T>,
) => StateInspectorHandle<T>

Registers a new state source for inspection.

applyStateInspectorUpdate: (id: string, value: unknown) => void

Applies a state mutation via state inspector.

refreshStateInspectorSource: (id: string) => void

Manually refreshes a state inspector source snapshot.

setIsIpcViewerEnabled: (enabled: boolean) => void

Enables/disables IPC communication tracking.

toggleIpcViewer: () => void

Toggles IPC viewer feature.

setIsEventLoggerEnabled: (enabled: boolean) => void

Enables/disables debug event logging.

toggleEventLogger: () => void

Toggles event logger feature.

setIsConfidenceTestExporterEnabled: (enabled: boolean) => void

Enables/disables confidence test export feature.

toggleConfidenceTestExporter: () => void

Toggles confidence test exporter feature.

setIsPerformanceMonitorEnabled: (enabled: boolean) => void

Enables/disables performance metrics collection.

togglePerformanceMonitor: () => void

Toggles performance monitor feature.

recordApiLatency: (
    duration: number,
    success: boolean,
    correlationId?: string,
    provider?: string,
    endpoint?: string,
) => void

Records an API request latency sample.

recordCacheAccess: (hit: boolean) => void

Records a cache hit or miss event.

recordMatchingProgress: (
    current: number,
    total: number,
    elapsedMs: number,
) => void

Records matching algorithm progress update.

updateMemoryStats: (stats: MemoryMetrics) => void

Updates memory usage metrics.

resetPerformanceMetrics: () => void

Clears all performance metrics.

exportPerformanceReport: () => Promise<void>

Exports performance metrics to JSON file.

recordEvent: (entry: DebugEventRecord, options?: RecordEventOptions) => void

Records a debug event to the event log.

clearEventLog: () => void

Clears all recorded debug events.

clearIpcEvents: () => void

Clears all IPC communication events.

clearLogs: () => void

Clears all console log entries.

exportLogs: () => Promise<void>

Exports console logs to JSON file.