Skip to content

Commit

Permalink
fix: set onlyAutoAttachExplicit to true by default
Browse files Browse the repository at this point in the history
This is a new setting that configures whether we'll _only_ attach to
processes that explicitly/already have `--inspect`.

With the new magical js-debug powers, we set auto attach to attach to
every Node process. Users with auto attach turned on in a previous
release, however, suddenly were debugging a lot of things that they
didn't want to (e.g. git precommit hooks or the `code` CLI). For myself
I had gotten used to toggling auto attach when I wanted to, but this is
a muscle that existing users don't have.

In this change we set `onlyAutoAttachExplicit` to be on by default,
matching the previous auto attach behavior. Users who want the to attach
to everything can toggle it off -- or use the debug terminal.
  • Loading branch information
connor4312 committed Jul 11, 2020
1 parent 4086375 commit 6932b62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/build/generate-contributions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ const configurationSchema: ConfigurationAttributes<IConfigurationTypes> = {
},
[Configuration.OnlyAutoAttachExplicit]: {
type: 'boolean',
default: false,
default: true,
markdownDescription: refString('configuration.onlyAutoAttachExplicit'),
},
};
Expand Down
2 changes: 1 addition & 1 deletion src/build/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const strings = {
'configuration.autoExpandGetters':
'Configures whether property getters will be expanded automatically. If this is false, the getter will appear as `get propertyName` and will only be evaluated when you click on it.',
'configuration.onlyAutoAttachExplicit':
'If false (default), we will debug all processes started while Auto Attach is on. If this setting is toggled to true, only processes started with --inspect will be debugged.\n\nNote: you may need to toggle Auto Attach to "disabled" and then "on" again for this setting to take effect.',
'If true (default), only processes started with --inspect will be debugged. If this setting is toggled to false, we will debug all processes started while Auto Attach is on.\n\nNote: you may need to toggle Auto Attach to "disabled" and then "on" again for changes in this setting to take effect.',

'profile.start': 'Take Performance Profile',
'profile.stop': 'Stop Performance Profile',
Expand Down

0 comments on commit 6932b62

Please sign in to comment.