Skip to content

Debugging ​

WarpDrive ships with comprehensive instrumented logging throughout its internals. All instrumentation is stripped from production builds — enabling it has zero production cost.

Logging is regionalized by concern so you can enable only the areas relevant to your investigation.

Quick Start ​

Open your browser's DevTools console and call:

ts
setWarpDriveLogging({ LOG_REQUESTS: true, LOG_CACHE: true })

No import needed — the helper is attached to globalThis automatically.

Runtime Activation ​

💡 Works directly in browser DevTools

No import required. Config is preserved across page reloads via sessionStorage.

ts
setWarpDriveLogging({
  LOG_REQUESTS: true,
  LOG_CACHE: true,
  LOG_NOTIFICATIONS: true,
})

Settings persist for the current browser tab only. Open a new tab (or call the helper with the flag set to false) to reset.

Build-time Activation ​

To enable logging by default in a dev environment, use the build config:

ts
setConfig(__dirname, app, {
  debug: {
    LOG_REQUESTS: true,
    LOG_CACHE: true,
  }
});

All flags default to false. Runtime activation via setWarpDriveLogging overrides build-time values for the current tab.

Log Flags ​

Requests ​

FlagWhat it logs
LOG_REQUESTSAll requests issued by the RequestManager
LOG_REQUEST_STATUSStatus updates for in-flight network requests

Cache ​

FlagWhat it logs
LOG_CACHEAll cache updates — both local and remote state
LOG_CACHE_POLICYDecisions made by the cache policy (e.g. whether to refetch)
LOG_NOTIFICATIONSNotifications received by the NotificationManager

Relationships ​

FlagWhat it logs
LOG_GRAPHUpdates to the relationship graph (pointer storage)
DEBUG_RELATIONSHIP_NOTIFICATIONSCause of change notifications when processing hasMany updates

Records & Identity ​

FlagWhat it logs
LOG_IDENTIFIERSPeek, generation, and updates to Record Identifiers
LOG_INSTANCE_CACHECreation and removal of RecordData and Record instances

Reactivity ​

FlagWhat it logs
LOG_REACT_SIGNAL_INTEGRATIONReact-specific reactivity events

Performance ​

FlagWhat it logs
LOG_METRIC_COUNTSKey count metrics useful for performance profiling

Deprecated Flags ​

These flags were removed in v5.5. They have no effect — use LOG_CACHE instead.

Removed flagReplacement
LOG_MUTATIONSLOG_CACHE
LOG_OPERATIONSLOG_CACHE
LOG_PAYLOADSLOG_CACHE

API Reference ​

See @warp-drive/core/build-config/debugging for the full API reference.

Released under the MIT License.