Skip to content

Commit cda3fbe

Browse files
committed
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 (microsoft#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 microsoft#74967. Fixes microsoft#105883 Fixes microsoft/vscode-js-debug#732 (the rest of it) Fixes microsoft#105963 Fixes microsoft#97087
1 parent 122fc9a commit cda3fbe

3 files changed

Lines changed: 222 additions & 240 deletions

File tree

extensions/debug-auto-launch/package.json

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,6 @@
1717
"watch": "gulp watch-extension:debug-auto-launch"
1818
},
1919
"contributes": {
20-
"configuration": {
21-
"title": "Node debug",
22-
"properties": {
23-
"debug.node.autoAttach": {
24-
"scope": "window",
25-
"type": "string",
26-
"enum": [
27-
"disabled",
28-
"on",
29-
"off"
30-
],
31-
"enumDescriptions": [
32-
"%debug.node.autoAttach.disabled.description%",
33-
"%debug.node.autoAttach.on.description%",
34-
"%debug.node.autoAttach.off.description%"
35-
],
36-
"description": "%debug.node.autoAttach.description%",
37-
"default": "disabled"
38-
},
39-
"debug.javascript.usePreviewAutoAttach": {
40-
"scope": "window",
41-
"type": "boolean",
42-
"default": true,
43-
"description": "%debug.javascript.usePreviewAutoAttach%"
44-
}
45-
}
46-
},
4720
"commands": [
4821
{
4922
"command": "extension.node-debug.toggleAutoAttach",
@@ -57,5 +30,11 @@
5730
},
5831
"devDependencies": {
5932
"@types/node": "^12.11.7"
33+
},
34+
"prettier": {
35+
"printWidth": 100,
36+
"trailingComma": "all",
37+
"singleQuote": true,
38+
"arrowParens": "avoid"
6039
}
6140
}
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
{
22
"displayName": "Node Debug Auto-attach",
33
"description": "Helper for auto-attach feature when node-debug extensions are not active.",
4-
5-
"debug.node.autoAttach.description": "Automatically attach node debugger when node.js was launched in debug mode from integrated terminal.",
6-
"debug.javascript.usePreviewAutoAttach": "Whether to use the preview debugger's version of auto attach.",
7-
"debug.node.autoAttach.disabled.description": "Auto attach is disabled and not shown in status bar.",
8-
"debug.node.autoAttach.on.description": "Auto attach is active.",
9-
"debug.node.autoAttach.off.description": "Auto attach is inactive.",
10-
114
"toggle.auto.attach": "Toggle Auto Attach"
125
}

0 commit comments

Comments
 (0)