aaronpowell / vscode-profile-switcher

A VS Code extension for switching settings easily
https://marketplace.visualstudio.com/items?itemName=aaronpowell.vscode-profile-switcher&wt.mc_id=profileswitcher-github-aapowell
MIT License
177 stars 19 forks source link

settings.json changed beyond repair #45

Open sanjarcode opened 3 years ago

sanjarcode commented 3 years ago

I installed the extension and made some profiles. I have around 25 extensions and made 5 profiles.

Two problems occurred:

  1. All settings in settings.json were copied/segregated to the ProfileSwitcher.storage object. This makes it very difficult to set global settings. Consequently, the file bloats by a large amount.
  2. I synced my setting using Settings Sync by ShanKhan. The gist had around 79k additions in 300 files. This may be Settings Sync's problem, but it is highly unlikely. I've been using it for years and had 23 files in all.

Steps to reproduce:

  1. Install the extension
  2. Make some profiles
  3. Sync your settings
  4. Check your Gist at GitHub

I git reseted the gist and tried to sync settings, but vscode brings back the extension from Code cache in ~/.config. If you sync in this state the gist grows back.

To get back your settings(this works for me):

  1. Clone your Gist
  2. Reset it back to a stable commit
  3. Uninstall the extension
  4. Uninstall vscode
  5. Manually delete ~/.config/Code/, ~/.vscode/ and /usr/share/Code.
  6. Reinstall vscode and download settings.
  7. Delete the extension again. Idk how many cache locations vscode has.
  8. Upload settings.

Please look into this. I'll try to send a PR.