vscode/extensions/debug-auto-launch
Connor Peet 66744e3b25
debug: enable js-debug to auto attach (#95807)
* 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
2020-04-23 09:49:29 -07:00
..
src debug: enable js-debug to auto attach (#95807) 2020-04-23 09:49:29 -07:00
.vscodeignore Use webpack also for small built-in extensions 2018-09-20 14:17:45 +02:00
extension.webpack.config.js Use webpack also for small built-in extensions 2018-09-20 14:17:45 +02:00
package.json debt - bump node.d.ts dependency in extensions to 12.x (part of #82514) 2019-10-28 08:11:47 +01:00
package.nls.json move auto-attach into new built-in extension; fixes #53586 2018-07-12 16:41:03 +02:00
tsconfig.json Update more extensions to use shared config 2018-10-02 10:24:19 -07:00
yarn.lock debt - bump node.d.ts dependency in extensions to 12.x (part of #82514) 2019-10-28 08:11:47 +01:00