Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Connor Peet aed1287598
fix: wait for debugger to be enabled before setting bps in vs
Fixes #1109
2021-09-20 16:26:24 -07:00
Connor Peet 540fbcace9
feat: add a `attachSimplePort` to launch and attach via port
In js-debug, process attachment in general (for Node.js) is done by
injecting a "bootloader" script in the NODE_OPTIONS environment
variable. This lets us do plenty of really cool things, like
automatically attaching to child process and building the Debug
Terminal. However, the bootloader doesn't work for all scenarios, namely:

1. Deno does not support NODE_OPTIONS
2. Some people `docker run` from their launch configuration, through
   which the bootloader isn't and can't be propagated.

So this brings back the 'old fashioned' attach mode for these scenarios.
The parameter is renamed `attachSimplePort` from simply `port`, because
the have lots of existing users with `port` in their options for whom
the bootloader will work perfectly and unlock additional functionality.

If attachSimplePort is given, we won't inject the bootloader at all, so
child processes won't be debugged automatically, but it should work.

Fixes: https://github.com/microsoft/vscode-js-debug/issues/586
Fixes discussion in: https://github.com/denoland/vscode_deno/issues/12
2020-07-15 12:14:16 -07:00