Skip to content

Inspector: worker target discovery and cross-thread transport #156

Description

@chrisbbreuer

Parent: #139
Decomposed from #154.

Implement explicit debugger targets for isolated JSWorkerRef runtimes. A worker has no parent JSContextRef today and runs on its own owner thread, so it must not be silently folded into an unrelated context session.

Acceptance:

  • Give every worker runtime a stable target identity and lifecycle metadata without exposing raw pointers.
  • Add target discovery/attach/detach protocol behavior and a documented embedder transport contract.
  • Marshal inspector commands to the worker owner thread and events back without invoking a context-affine callback on the wrong thread.
  • Support worker scripts, pause/resume, breakpoints, stepping, exceptions, call frames, scopes, evaluation, and remote objects with the same zero-hidden inventory as the main target.
  • Define continuation ownership for multiple sessions attached to one worker and independent simultaneous pauses across workers/main contexts.
  • Termination, close, session detach, and worker release must unblock pending inspector traffic and release every remote/root exactly once.
  • Add script/module workers, active-message handlers, termination-at-pause, GC, concurrency, and teardown transcripts plus real C host coverage.
  • Update README/API/inspector documentation and the machine-readable protocol inventory.

Until this lands, #154 documents and tests the honest isolation boundary: a parent context inspector does not claim independently-created workers as child targets, and workers continue their own message/termination lifecycle while the parent is paused.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions