Open lucacasonato opened 1 month ago
Hi! I would be happy to help with a solution for this 🙂 Note that the bootloader is what drives debugging in general, including the JavaScript Debug Terminal, in addition to auto attach.
The bootloader does several things which I think are useful to stick around:
Runtime.runIfWaitingForDebugger
before executing the user's program. This is similar to the behavior of --inspect-brk
, but some communication needs to happen here because the process listens on a random port and that needs to be given to js-debug.While this has been fairly stable recently, it's not super trivial and I don't think I would want VSCODE_INSPECTOR_OPTIONS
to become contract, at least not at this point. The lifecycle is also tied to the specifics around how js-debug's attachment works which are likely not generally applicable to other clients.
On your latter two points:
Hey folks!
I'm one of the maintainers of Deno. js-debug has already works pretty well with Deno, but I was wondering if we could chat to y'all about how to make it work even better. For example, we're hearing from many people that they'd like auto-attach to work with Deno. We are very interested to make this work natively - for example by automatically reading the
VSCODE_INSPECTOR_OPTIONS
and connecting to the inspector (bypassing the bootloader.js script entirely).We are also working on network panel support right now, and it'd be great to expose that in VS Code too when debugging Deno. Also hooking up the inspecting of workers and subprocesses would be really awesome.
We're happy to do all the work here. It'd just be great to figure out how to best do this without getting in your way too much. You can reach me at luca (at) deno.com too :)