-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #88599 (comment) 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
- Loading branch information
1 parent
044bf17
commit 66744e3
Showing
1 changed file
with
187 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters