microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.94k stars 28.77k forks source link

All my custom snippets gone and deleted #175071

Open Dekadinious opened 1 year ago

Dekadinious commented 1 year ago

Type: Bug

I don't quite know the steps. Sometime after an update I got signed out of my synced account. I then signed into a wrong account believing it was the correct one. After signing out of that and then into the other account all my snippets were gone.

Luckily I had them synced to another computer, so I started that without internet connection and got my snippet files backed up. Then I could re-add them to my account.

But now I have a huge fear that this might happen at any time.

VS Code version: Code 1.75.1 (441438abd1ac652551dbe4d408dfcec8a499b8bf, 2023-02-08T21:32:34.589Z) OS version: Windows_NT x64 10.0.19045 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|7.43GB (0.73GB free)| |Process Argv|--crash-reporter-id 3914ced8-4c4f-4f85-b96c-89b09c6f4c10| |Screen Reader|no| |VM|0%|
Extensions (27) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 vscode-intelephense-client|bme|1.9.5 vscode-better-align|cho|1.4.1 wpcs-whitelist-flags|cla|1.1.0 vscode-eslint|dba|2.4.0 EditorConfig|Edi|0.16.4 prettier-vscode|esb|9.10.4 vscode-pull-request-github|Git|0.58.2 dupchecker|jia|0.1.7 compare-folders|mos|0.22.3 isort|ms-|2022.8.0 python|ms-|2023.2.0 vscode-pylance|ms-|2023.2.30 jupyter|ms-|2023.1.2010391206 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.14 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 vscode-yaml|red|1.11.0 phpdoc-generator|ron|1.1.1 vscode-stylelint|sty|1.2.4 vscode-status-bar-format-toggle|tom|3.1.1 vscode-phpsab|val|0.0.16 keyoti-changeallendoflinesequence|vs-|0.0.3 php-debug|xde|1.31.1 php-convert-array|Yan|0.0.3 TabSpacer|yui|1.0.2
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 vsccc:30610678 pyindex848:30662994 nodejswelcome1:30587005 3biah626:30602489 pyind779:30662992 f6dab269:30613381 pythonsymbol12:30657548 a9j8j154:30646983 ```
sandy081 commented 1 year ago

Sorry about what happened. You do not need to fear because we store the history and you can always restore from there - https://code.visualstudio.com/docs/editor/settings-sync#_restoring-data.

Regarding loosing snippets, can you please give us more information that what happened after signing with wrong account? Did you have snippets then and snippets are synced? Did you ever synced with the wrong account before?

Dekadinious commented 1 year ago

I am not completely sure exactly what happened. But I noticed that VSCode was not signed in, so I signed in. But I did so to the wrong Microsoft account. I started coding and noticed that my shortcuts did not work. Then I noticed I was in the wrong account, so I switched it over. Then my shortcuts started working, but when I tried a snippet it did not work. When I checked, all my snippet files were gone. I am glad there is a way to restore the data :)

sandy081 commented 1 year ago

I would like to access the logs that VS Code generates to see what would have happened. Can you please do the following?

Thanks again for giving us info.

Dekadinious commented 1 year ago

I sent them to you, but I don't know if you got them? @sandy081

sandy081 commented 1 year ago

Yes, I received them. Will take a look and get back to you. Thanks.