Guides
Debug Logging
Inspect Comctx message flow while developing adapters or cross-context integrations.
Use debug when validating an adapter or investigating cross-context flow:
export const [provideCounter, injectCounter] = defineProxy(() => new Counter(), {
namespace: '__comctx-example__',
debug: import.meta.env.DEV
})For focused output, use a debug level:
debug: 'event'Levels
debug accepts:
debug?: boolean | 'message' | 'event'falsedisables debug output.truelogs both message and event output.messagelogs adapter-level message flow.eventlogs effective Comctx events.
Labels
Debug output uses two labels:
comctx:messageshows messages observed by the adapter. These logs are useful when checking adapter wiring, but they can be noisy because one message can be seen by multiple listeners.comctx:eventshows messages accepted by Comctx and routed into send or receive handling.
Examples:
comctx:message provider onMessage apply
comctx:event provider onMessage apply
comctx:event injector sendMessage pingThe second label is the current actor. For sendMessage, it is the side sending the message. For onMessage, it is the side currently receiving or handling the message.