Skip to content

Debug event reference ​

The structured debug bus exposes a typed event set for console diagnostics, custom reporters, retained history, and first-party tooling. The protocol is type-only under @vuqs/core/debug-protocol and is governed by DEBUG_PROTOCOL_VERSION rather than the package's normal semver.

Experimental protocol

Event codes and payloads may change when DEBUG_PROTOCOL_VERSION changes. Console prose is a human-facing projection and may improve without changing the protocol version.

For activation, filtering, payload safety, SSR isolation, and reporter examples, start with the debugging guide.

Event shape ​

Every reporter receives the same envelope:

ts
interface DebugEvent {
  code: string
  scope: string
  level: 'debug' | 'warn'
  seq: number
  timestamp: number
  monotonicTime?: number
  context?: {
    runtimeId?: string
    bindingId?: string
    transactionIds?: readonly number[]
    batchId?: number
  }
  data: unknown
}

The strict KnownDebugEvent union narrows data from code. Import it and the complete DebugEventMap from @vuqs/core/debug-protocol when building protocol-aware tooling.

Summary policies ​

  • Visible: produces its own human summary.
  • Conditional: produces a summary only for the configured outcomes.
  • Aggregated: contributes to another logical result, such as a committed URL write.
  • Trace only: stays out of the default summary but appears in the complete trace.
  • Pass-through: preserves prose and console arguments supplied by createDebugLogger.

A normal write correlates several events but produces one summary result:

text
tx:start → binding:set → gtq:enqueue → gtq:flush
         → adapter:navigate → adapter:commit → gtq:settle

[vuqs] Updated the URL: "color" = "green".

The trace keeps every intermediate event. Its expandable details carry sequence, timestamps, runtime, binding, transaction, batch, scope, and the event's typed payload.

Common summary results ​

Summary prose describes the observable result of a correlated operation. It does not mirror each low-level event. These are the common committed-write forms:

text
[vuqs] Updated the URL: "color" = "green".
[vuqs] Removed "draft" from the URL.
[vuqs] Updated 2 URL parameters in one navigation: updated "q" and removed "page".
[vuqs] Updated the URL and added a browser history entry: "page" = 2.
[vuqs] "page" now uses its default value (1), so the URL does not need a "page" parameter.

The default-valued form reports the effective query state. It does not imply that the caller explicitly requested a removal. Default canonicalization that leaves the URL unchanged produces no summary line.

Events ​

The compact index is followed by the full reference grouped by scope. Each entry explains its summary behavior and, when it prints directly, shows an example from the tested console projection. Trace examples use the same formatter as the runtime; dynamic names and counts depend on each payload.

EventLevelSummary
binding:createddebugTrace only
binding:disposeddebugTrace only
binding:setdebugAggregated
engine:clear-on-defaultdebugAggregated
engine:parse-misswarnVisible
gtq:enqueuedebugTrace only
gtq:coalescedebugTrace only
gtq:scheduledebugTrace only
gtq:flushdebugAggregated
gtq:flush-skipdebugTrace only
gtq:settledebugTrace only
gtq:resetdebugTrace only
tx:startdebugTrace only
adapter:navigatedebugTrace only
adapter:commitdebugConditional
adapter:errorwarnVisible
adapter:missingdebugTrace only
hooks:subscribedebugTrace only
hooks:emitdebugTrace only
pipeline:tapdebugTrace only
rd:setdebugVisible
rd:cleardebugVisible
rd:resetdebugVisible
rd:registerdebugTrace only
ctx:builddebugTrace only
ctx:switchdebugTrace only
ctx:changedebugVisible
storage:restore-startdebugTrace only
storage:restoredebugConditional
storage:writedebugTrace only
storage:coalescedebugTrace only
storage:errorwarnVisible
serializer:clear-on-defaultdebugTrace only
serializer:builddebugTrace only
module:logdebugPass-through
module:warnwarnPass-through

binding events

​binding:created

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] binding:created — Created a query binding for "color".

​binding:disposed

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] binding:disposed — Disposed the query binding for "color".

​binding:set

Summary behavior: Does not print its own line. It contributes to a later logical result. Contributes the paths requested by this binding to the final committed-write summary.

Trace example

[vuqs trace] binding:set — Requested changes to "color".

engine events

​engine:clear-on-default

Summary behavior: Does not print its own line. It contributes to a later logical result. Explains when a changed URL path now uses its resolved default in the final committed-write summary.

Trace example

[vuqs trace] engine:clear-on-default — Omitted "page" from the serialized query because it matches the resolved default value.

​engine:parse-miss

Summary behavior: Prints its own line in the default summary. Warns that the invalid URL value was ignored.

Summary example

[vuqs] Ignored an invalid URL value for "page" because it could not be decoded.

Trace example

[vuqs trace] engine:parse-miss — Could not decode the URL value for "page".

gtq events

​gtq:enqueue

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] gtq:enqueue — Queued 1 URL change; 2 paths are now pending.

​gtq:coalesce

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] gtq:coalesce — Combined another write with the pending URL update.

​gtq:schedule

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] gtq:schedule — Scheduled the URL update for the next microtask.

​gtq:flush

Summary behavior: Does not print its own line. It contributes to a later logical result. Supplies the final changed paths, query, and navigation options to the committed-write summary.

Trace example

[vuqs trace] gtq:flush — Prepared 2 query parameters for navigation.

​gtq:flush-skip

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] gtq:flush-skip — Skipped the queue flush because no paths were pending.

​gtq:settle

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] gtq:settle — Removed committed paths from the optimistic state: "color" and "page".

​gtq:reset

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] gtq:reset — Reset the URL write queue.

tx events

​tx:start

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] tx:start — Started a patch transaction for "color".

adapter events

​adapter:navigate

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] adapter:navigate — Asked the "vue-router" adapter to replace the URL.

​adapter:commit

Summary behavior: Prints only for the outcomes described below. Completes one aggregated vuqs write, or reports paths changed outside vuqs.

Summary example

[vuqs] Updated "color" in the URL.

Trace example

[vuqs trace] adapter:commit — Observed a committed vuqs URL change for "color".

​adapter:error

Summary behavior: Prints its own line in the default summary. Reports the failed navigation and any values restored by rollback.

Summary example

[vuqs] Could not update the URL; restored the previous value of "color".

Trace example

[vuqs trace] adapter:error — The "vue-router" adapter could not update the URL.

​adapter:missing

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] adapter:missing — No query adapter was available in the current scope.

hooks events

​hooks:subscribe

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] hooks:subscribe — Subscribed to the "context:change" hook.

​hooks:emit

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] hooks:emit — Emitted the "context:change" hook.

pipeline events

​pipeline:tap

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] pipeline:tap — Registered a pre transform for the read pipeline.

rd events

​rd:set

Summary behavior: Prints its own line in the default summary. Reports the runtime-default decision with a bounded value preview.

Summary example

[vuqs] Set an empty runtime-default layer.

Trace example

[vuqs trace] rd:set — Set runtime defaults for "color" and "page".

​rd:clear

Summary behavior: Prints its own line in the default summary. Reports an explicit removal of the runtime-default layer.

Summary example

[vuqs] Cleared the runtime defaults.

Trace example

[vuqs trace] rd:clear — Cleared the runtime defaults.

​rd:reset

Summary behavior: Prints its own line in the default summary. Explains that a context change cleared the runtime-default layer.

Summary example

[vuqs] Cleared the runtime defaults after the query context changed to "reviews".

Trace example

[vuqs trace] rd:reset — Cleared runtime defaults after the query context changed to "reviews".

​rd:register

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] rd:register — Registered the runtime-default layer.

ctx events

​ctx:build

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] ctx:build — Built the query for a context change; kept "search" and dropped "category".

​ctx:switch

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] ctx:switch — Requested a switch to query context "reviews".

​ctx:change

Summary behavior: Prints its own line in the default summary. Reports the committed context and any query paths that became invalid.

Summary example

[vuqs] Changed the query context to "reviews"; "category" is no longer valid.

Trace example

[vuqs trace] ctx:change — Changed the query context to "reviews"; "category" is no longer valid.

storage events

​storage:restore-start

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] storage:restore-start — Started restoring "filters" from storage.

​storage:restore

Summary behavior: Prints only for the outcomes described below. Appears only when stored state is applied or the current URL wins over storage.

Summary example

[vuqs] Applied saved query state from "filters".

Trace example

[vuqs trace] storage:restore — Storage initialization for "filters" finished with outcome "restored".

​storage:write

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] storage:write — Started saving revision 3 of "filters" to storage.

​storage:coalesce

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] storage:coalesce — Replaced pending storage revision 2 with revision 3 for "filters".

​storage:error

Summary behavior: Prints its own line in the default summary. Reports the failed storage operation with an operation-specific sentence.

Summary example

[vuqs] Could not save "filters" to storage.

Trace example

[vuqs trace] storage:error — Storage operation "save" failed for "filters".

serializer events

​serializer:clear-on-default

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] serializer:clear-on-default — Omitted "page" because it matches its default value.

​serializer:build

Summary behavior: Does not appear in the default summary.

Trace example

[vuqs trace] serializer:build — Built a query object with 2 top-level parameters.

module events

​module:log

Summary behavior: Prints the message supplied by the module author. Prints the module-authored message and projected native console arguments.

Summary example

[vuqs module] hello

Trace example

[vuqs trace] module:log — Module "module" logged: Resolved value.

​module:warn

Summary behavior: Prints the message supplied by the module author. Prints the module-authored warning and projected native console arguments.

Summary example

[vuqs module] careful

Trace example

[vuqs trace] module:warn — Module "module" warned: Could not resolve value.

Released under the MIT License.