EpiDebug Subsystem Reference

# EpiDebug Subsystem Reference

EpiDebug is an advanced runtime inspection tool for Epicor Kinetic. Operating within the Angular production environment, it leverages deep introspection and live instrumentation to provide comprehensive diagnostic capabilities without requiring server-side components.

## Core Features

### 1. Visual Inspector
A high-performance recursive tree renderer that handles live state mapping across the complicated Epicor metadata architecture.
– **Dynamic State:** Debounced rendering via Custom `requestAnimationFrame` matching UI changes in real-time.
– **Inline Editing:** Direct manipulation of complex variables wrapped elegantly within an Editor-inspired UI payload limit layout.
– **Cross-Window Mapping:** Multi-window support capable of finding targets across independent browser windows originating from the same environment context.

### 2. Event Debugger
A time-travelling diagnostic overlay specific to the MetaFx event graph.
– **Action-First Step Semantics:** Steps natively along action boundaries ensuring pauseability at critical workflow chokepoints.
– **RxJS Gating:** Sophisticated mechanism halting execution exactly at observable hooks.
– **Lineage Tracing:** Real-time visual tracing for complex rule-based executions.

### 3. BO Poker (REST API Explorer)
A fully-featured REST client running within Epicor using the same-origin session context cookies, offering parity with Epicor REST Help Pages.
– **Auto-Discovery:** Effortlessly discovers all business objects, custom functions (EFX), and BAQs natively.
– **OData Intelligence:** Advanced query builders mirroring standard OData query arguments including pagination offsets ($skip) and result boundaries ($top).
– **OpenAPI 3 Parsing:** Parses Swagger annotations directly for smart suggestion handling and parameter validation.
– **RowMod Injection:** Automatic RowMod injection ensures standard BO payload requirements stringently meet Epicor architectural patterns.

### 4. Service Registry Deep Inspection
An introspection tier targeting Kinetic’s Angular architecture.
– **Dependencies Mapping:** Explores full singleton boundaries building comprehensive relation maps.
– **RxJS Tracking:** Discovers implicit subscriptions, observers, and observable properties wrapped by standard classes.
– **Health Scoring:** Classifies services and delegates composite scores (0-100) dynamically based on subscriber activity and initialized state.
– **Safety First:** Prevents object prototype pollution while ensuring safe deep inspection across the environment.

### 5. Trace Flags & Telemetry
Integrates deeply with Epicor’s logging mechanics to provide enhanced tracing visibility.
– **Server-Timing Header Hooking:** Parses payload timings directly providing explicit metric details down to the millisecond.
– **Network Extensibility:** Merges explicit `_EPICOR_TRACE_FLAGS` cleanly inside generic fetch patterns mirroring native behavior natively.
– **Inline Proxying:** Forwards complete ServerTrace output directly into the client window debugger view providing robust log correlation automatically.

### 6. Diagnostics & Interceptions
Runtime modifiers supporting advanced data visibility and metric measurements natively via proxy wraps.
– **DataCache Hooking:** Duck-types Cache implementations capturing ring buffers inside setter/getter interceptors.
– **Zone.js Interceptors:** Monitors execution and logs specific observable triggers from within Zone boundaries.
– **History Router Patches:** Pushes child window sync hooks dynamically for robust client routing state mapping.