* debug: enable js-debug to auto attach
This modifies the debug-auto-launch extension to trigger js-debug as
outlined in https://github.com/microsoft/vscode/issues/88599#issuecomment-617242405
Since we now have four states, I moved the previous combinational logic
to a `transitions` map, which is more clear and reliable. The state
changes are also now a queue (in the form of a promise chain) which
should avoid race conditions.
There's some subtlety around how we cached the "ipcAddress" and know
that environment variables are set. The core desire is being able to
send a command to js-debug to set the environment variables only if they
haven't previously been set--otherwise, reused
the cached ones and the address.
This process (in `getIpcAddress`) would be vastly simpler if extensions
could read the environment variables that others provide, though there
may be security considerations since secrets are sometimes stashed
(though I could technically implement this today by manually creating
and terminal and running the appropriate `echo $FOO` command).
This seems to work fairly well in my testing. Fixes#88599.
* fix typo
* clear js-debug environment variables when disabling auto attach