Commit Graph

27 Commits

Author SHA1 Message Date
Johannes Rieken
9e21aff42e joh/ts transpile (#152199)
transpile-only tasks for client and extensions

* extract transpile into its own file
* add transpile-client task, polish transpiler
* add transpile-extensions, improve transpile logic
* move declaration of "const enum" above it usage so that it can be used with const-enum-inlining
* (ugly) make d.ts transpilation configurable because it is needed for extensions but a problem for client
* hack my way around so that `getOwnEmitOutputFilePath` is reusable by our transpile
* honor `noEmit` flag
2022-06-15 16:52:48 +02:00
Johannes
0656d21d11 auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
Johannes Rieken
68e819043c use tsconfig.json#include for vscode.d.ts and vscode.proposed.d.ts, enables to remove most ref.d.ts-files 2021-11-09 15:53:35 +01:00
Johannes Rieken
9254a8cd27 move vscode.d.ts and vscode.proposed.d.ts into src/vscode-dts-folder, https://github.com/microsoft/vscode/issues/131165 2021-11-09 15:00:03 +01:00
Connor Peet
9176be11bc debug: don't active js-debug unnecessarily
Fixes https://github.com/microsoft/vscode-js-debug/issues/1106
2021-10-11 15:28:26 -07:00
Benjamin Pasero
159479eb5a Allow to show status bar entries with an id and name (fix #74972) 2021-05-19 14:03:37 +02:00
Connor Peet
63137db51c debug: fix auto attach not turning on if reselecting current state
Fixes https://github.com/microsoft/vscode/issues/111021
2020-12-03 22:07:19 -08:00
Connor Peet
a194746aa3 auto attach: allow temporarily disabling
Fixes https://github.com/microsoft/vscode/issues/111021
2020-11-20 16:08:05 -08:00
Connor Peet
c17be01663 debug: recover gracefully from a stuck auto attach pipe 2020-09-30 16:33:06 -07:00
Matt Bierner
d19c4ec92c Fix TS 4.1 error 2020-09-16 19:58:09 -07:00
Connor Peet
480b18a8d3 debug: apply polish to auto attach switcher 2020-09-16 15:36:14 -07:00
Connor Peet
cda3fbe7f8 debug: use only js-debug auto attach, collapse settings
This PR removes the hook in node-debug's auto attach, and uses only
js-debug auto attach. As referenced in the linked issues, this involves
removing `debug.javascript.usePreviewAutoAttach` and collapsing
`debug.node.autoAttach` into `debug.javascript.autoAttachFilter`. The
latter option gains a new state: `disabled`. Since there's no runtime
cost to having auto attach around, there is now no distinct off versus
disabled state.

The status bar item and the `Debug: Toggle Auto Attach` command now
open a quickpick, which looks like this:

![](https://memes.peet.io/img/20-09-9d2b6c0a-8b3f-4481-b2df-0753c54ee02b.png)

The current setting value is selected in the quickpick. If there is a
workspace setting for auto attach, the quickpick toggle the setting
there by default. Otherwise (as in the image) it will target the user
settings. The targeting is more explicit and defaults to the user
instead of the workspace, which should help reduce confusion (#97087).
Selecting the "scope change" item will reopen the quickpick in that
location.

Aside from the extra options for the `disabled` state in js-debug's
contributions, there's no changes required to it or its interaction
with debug-auto-launch.

Side note: I really wanted a separator between the states and the
scope change item, but this is not possible from an extension #74967.

Fixes https://github.com/microsoft/vscode/issues/105883
Fixes https://github.com/microsoft/vscode-js-debug/issues/732 (the rest of it)
Fixes https://github.com/microsoft/vscode/issues/105963
Fixes https://github.com/microsoft/vscode/issues/97087
2020-09-11 16:33:06 -07:00
Connor Peet
fef3e22ca7 fix: refresh env vars when auto attach settings change
Fixes https://github.com/microsoft/vscode-js-debug/issues/731
2020-09-01 08:54:50 -07:00
Connor Peet
8817251691 debug: provide positive ack to js-debug bootloader on auto attach 2020-08-25 09:44:18 -07:00
Connor Peet
ad40702857 debug: bump js-debug and use its auto attach by default once more 2020-08-21 18:47:20 -07:00
Connor Peet
dc0150c61a debug: make auto attach apply state transition in new workspaces
Previous there was a case:

1. Auto attach was enabled in user settings and workspace A was open
2. Switch to workspace B, and then turn auto attach off in user settings
3. Switching back to workspace A, environment variables were not cleared

Now, the last state is stored in the workspace settings so that
we can tear down the previous state if necessary.
2020-08-20 16:06:18 -07:00
Connor Peet
bb284a4943 debug: enable opt-in js-debug auto attach 2020-08-18 12:31:31 -07:00
Connor Peet
add05e385e debug: always clear out any js-debug state 2020-07-13 11:34:32 -07:00
Connor Peet
24cff71f25 debug: use previous node debug for the July release 2020-07-13 11:34:24 -07:00
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
Matt Bierner
dd3e2d94f8 Remove use strict directives in extension code
We compile with alwaysStrict so these directives are not needed
2018-10-02 16:02:44 -07:00
Matt Bierner
52d3961c2b Update more extensions to use shared config 2018-10-02 10:24:19 -07:00
Andre Weinand
1ae8d0168e auto-attach cleanup 2018-08-25 00:21:24 +02:00
Andre Weinand
14595011f1 move some auto-attach code back to node-debug 2018-08-22 01:08:52 +02:00
Andre Weinand
edfda964e0 use terminal.processId for auto-attach; fixes #55918 2018-08-07 12:28:30 +02:00
Andre Weinand
47cf06001c detect 'winpty-agent.exe'; fixes #55672 2018-08-02 17:37:02 +02:00
Andre Weinand
bf7ac9201e move auto-attach into new built-in extension; fixes #53586 2018-07-12 16:41:03 +02:00