microsoft / microsoft/vscode-js-debug

Support for `workerd` (Cloudflare Workers)

Open
#2,233 3 comments 0 reactions 1 assignee View on GitHub

@connor4312 is already working on this.

Since Jun 9, 2025.

feature-request
Dominant language
TypeScript
Stars
2k
Forks
373
Avg merge
1d 9m
Merged PRs (30d)
6

Description

Similarly to this Deno issue, we'd love to be able to natively support auto-attaching to workerd processes when running in a JS debug terminal.

Unfortunately (like Deno), workerd doesn't read the NODE_OPTIONS env var, and doesn't (and won't) support require hooks of the form needed to load the bootloader script. It'd be great to figure out what the right integration pattern here is—whether it's us reading VSCODE_INSPECTOR_OPTIONS directly, or us somehow running a subset of the bootloader script.

As a first pass, I had a go at seeing what us running the watchdog script directly would look like, and it seems to work fairly well: https://github.com/cloudflare/workers-sdk/pull/9535/files#diff-43ebb33e60024410f187f4099d80c0e0ebfe53b837a046643fdf055aba8cc613R183-R220. I'm a tad worried about how many assumptions about the internals of vscode-js-debug that requires though—is the watchdog interface likely to remain stable?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.