Current SDK setting stored in current project folders .vscode/settings
See original GitHub issueDescribe the bug
When using the Dart: Change SDK
command to set a Dart SDK from a list, when choosing a sdk option thats not the auto-detected one, the selection is stored in the current open folders settings, not vscode’s user settings.
To Reproduce Steps to reproduce the behavior:
- Open command palette
- enter
Dart: Change SDK
command - select non auto selected SDK option
- note settings .json in current open folder is modified with the newly selected SDK choice, eg. in
.vscode/settings.json
{
"dart.sdkPath": "/opt/apps/dart-sdk"
}
Expected behavior Per previous comment I had expected that this is a vscode-wide user setting, rather than a per project-folder setting.
The above also applies for the equivalent Flutter SDK choice functionality.
Versions (please complete the following information):
- VS Code version: 1.52.1
- Dart extension version: v3.18.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
User and Workspace Settings - Visual Studio Code
Workspace settings as well as debugging and task configurations are stored at the root in a .vscode folder. You can also have more...
Read more >Workspaces in Visual Studio Code
Configure settings that only apply to a specific folder or folders but not others. ... all of the folders and workspace settings from...
Read more >Multi-root Workspaces in Visual Studio Code
Preferences: Open User Settings - Open your global User settings ; Preferences: Open Workspace Settings - Open the settings section of your Workspace...
Read more >Variables reference - Visual Studio Code
Variables Reference. Visual Studio Code supports variable substitution in Debugging and Task configuration files as well as some select settings.
Read more >Settings Sync in Visual Studio Code
You can always change what is synced via the Settings Sync: Configure command or by opening the Manage gear menu, selecting Settings Sync...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah yes, I hadn’t considered that it would go there for a
.code-workspace
. That doesn’t seem too bad while waiting for VS Code to provide something better (if it ever does) 😃Thanks again @DanTup for that pointer to the vscode issue!
So the easy workaround for me from reading that issue is just to use a workspace and then the “selected” flutter and dart sdk path gets set in the
.code-workspace
setting instead of a “folders”settings.json
- which works well for me 👍 🎉