Skip to content

Support for workerd (Cloudflare Workers) #2233

@penalosa

Description

@penalosa

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?

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions