question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Current SDK setting stored in current project folders .vscode/settings

See original GitHub issue

Describe 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:

  1. Open command palette
  2. enter Dart: Change SDK command
  3. select non auto selected SDK option
  4. 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Jan 6, 2021

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) 😃

0reactions
makscommented, Jan 5, 2021

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 👍 🎉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found