Skip to content

abortLogger

const abortLogger: {
get enabled(): boolean;
keystrokeAborted: void;
keystrokeCreated: void;
keystrokeSignalCleared: void;
keystrokeSignalSet: void;
localControllerCreated: void;
signalLinked: void;
signalUnlinked: void;
staleDataDiscarded: void;
};

Defined in: packages/engine/src/utilities/AbortControllerLogger.ts:37

Records abort-signal lifecycle for debugging cancellation.

Keystroke cancellation is hard to reason about after the fact, because the evidence is gone by the time anything looks wrong. This keeps it.

get enabled(): boolean;

Whether debug logging is currently active.

boolean

keystrokeAborted(reason): void;

Log abortion of the keystroke-level AbortController.

ParameterTypeDescription
reasonstringWhy the keystroke was aborted (e.g. “New keystroke”, “Document switch”, “Plugin destroyed”).

void

keystrokeCreated(): void;

Log creation of the keystroke-level AbortController. Called in the plugin constructor and on each new keystroke.

void

keystrokeSignalCleared(): void;

Log that the keystroke signal was CLEARED from the engine (typically in the evaluator’s finally block).

void

keystrokeSignalSet(isAborted): void;

Log that the keystroke signal was propagated INTO the engine.

ParameterTypeDescription
isAbortedbooleanWhether the signal was already aborted when set.

void

localControllerCreated(source): void;

Log creation of a local AbortController that is linked to the keystroke signal.

ParameterTypeDescription
sourcestringWhich code path created the controller (e.g. “executeAndStore”, “executeRaw”, “preflight”, “vm”).

void

signalLinked(source): void;

Log that a local AbortController was linked to the keystroke signal. When the keystroke signal is aborted, this local controller will be aborted automatically.

ParameterTypeDescription
sourcestringThe code path that created the controller.

void

signalUnlinked(source): void;

Log that a local AbortController’s listener was removed from the keystroke signal (cleanup).

ParameterTypeDescription
sourcestringThe code path.

void

staleDataDiscarded(queryKey, context): void;

Log that a stale async result was discarded because its signal was aborted.

ParameterTypeDescription
queryKeystringThe cache key for the discarded result.
contextstringAdditional context (e.g. “after await”, “after error”).

void