Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - Verify existing Bookmarks.json file when turning on "Save Bookmarks In Project" #690

Open
Rapscallion0 opened this issue Jan 17, 2024 · 2 comments

Comments

@Rapscallion0
Copy link

I recently had some issues with VSC (I believe extension related) and ended up resetting settings and extensions. This seems to have resolved my issue. However the Bookmarks setting "Save Bookmarks In Project" was turned off after resetting and I had this turned on prior to resetting. When opening a project in VSC I noticed that my bookmarks were not available. I confirmed that a .vscode\Bookmarks.json file existed and then after a little digging noticed that "Save Bookmarks In Project" was disabled. I enabled the "Save Bookmarks In Project" and noticed immediately that Bookmarks.json disappeared from VSC explorer (I had it open as per previous mentioned investigation).

Further investigation revealed that Bookmarks.json was indeed completely deleted.

Environment/version

  • Extension version: v13.4.2
  • VSCode version: 1.85.1
  • OS version: Windows 11 23H2 (22632.3007)
@alefragnani
Copy link
Owner

Hi @Rapscallion0 ,

Once you enable saveBookmarksInProject setting, the bookmarks from the current session will be saved locally, overwriting any previously saved file. This happens simply because the local bookmarks are not loaded unless saveBookmarksInProject is set to true. That being said, the scenario you experienced is the expected behavior.

But, I understand your report, and I think a small change could be added to avoid missing previously saved bookmarks. When enabling saveBookmarksInProject, look for a already saved bookmarks.json file, and ask if really want to overwrite it. Answering yes, will work as today. Answering no will ignore the current bookmarks and reload the ones from bookmarks.json.

Hope this helps

@Rapscallion0
Copy link
Author

Hi @alefragnani,

This sounds like a great solution to my issue!

Thank you for looking into this!

@alefragnani alefragnani changed the title [BUG] - Bookmarks.json deleted when turning on "Save Bookmarks In Project" [FEATURE] - Verify existing Bookmarks.json file when deleted when turning on "Save Bookmarks In Project" Apr 2, 2024
@alefragnani alefragnani changed the title [FEATURE] - Verify existing Bookmarks.json file when deleted when turning on "Save Bookmarks In Project" [FEATURE] - Verify existing Bookmarks.json file when turning on "Save Bookmarks In Project" Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants