microsoft / vscode

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

VSCode empties out config.json file when saved. #151116

Closed michaelyousrie closed 2 years ago

michaelyousrie commented 2 years ago

Issue Type: Bug

Whenever I save the config.json file after doing any edit (or even without any edits, just pressing CTRL + S ), it would immediately go blank and completely wiped out.

I had to use another editor to edit the config.json file and be able to save it without issues.

VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:15:52.058Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 3600 6-Core Processor (12 x 3593)| |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
oop_rasterization: enabled
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| |Load (avg)|undefined| |Memory (System)|15.95GB (9.04GB free)| |Process Argv|--crash-reporter-id c41d5be7-0b36-4ae8-9d31-e0997aecf6df| |Screen Reader|no| |VM|50%|
Extensions (74) Extension|Author (truncated)|Version ---|---|--- rainbow-brackets|2gu|0.0.6 vsc-material-theme|Equ|33.4.0 vs-code-http-server-and-html-preview|Fli|2.2.2 gc-excelviewer|Gra|4.2.54 todo-tree|Gru|0.0.215 minify|Hoo|0.4.3 swift|Kas|0.2.0 dotnet-core-essentials|Kis|0.0.8 php-namespace-resolver|Meh|1.1.8 ActiveFileInStatusBar|Ros|1.0.3 theme-pack|Tyr|0.1.1 alpine-js-intellisense|adr|1.2.0 vscode-nginx-conf|ahm|0.1.3 primer-light|and|0.0.6 vscode-color|ans|0.4.5 theme-verdandi|be5|2.0.1 vscode-intelephense-client|bme|1.8.2 vscode-tailwindcss|bra|0.8.6 better-phpunit|cal|1.5.3 npm-intellisense|chr|1.4.1 vscode-mysql-client2|cwe|5.3.6 c-cpp-compile-run|dan|1.0.15 dart-code|Dar|3.42.1 flutter|Dar|3.42.0 es7-react-js-snippets|dsz|4.4.3 vscode-babel-coloring|dza|0.0.4 gitlens|eam|12.0.7 vscode-html-css|ecm|1.12.2 vscode-npm-script|eg2|0.3.25 LogFileHighlighter|emi|2.15.0 vscode-great-icons|emm|2.1.86 vsc-material-theme-icons|equ|2.3.1 prettier-vscode|esb|9.5.0 json-pretty-printer|eus|1.1.0 code-runner|for|0.11.7 vscode-nginx-conf-hint|han|0.3.0 gitignore-templates|has|1.0.1 composer|ika|0.8.0 phpcs|ika|1.0.5 monkey-patch|ioc|0.1.16 twig-language-2|mbl|0.9.2 rainbow-csv|mec|2.4.0 dotenv|mik|1.0.1 theme-monokai-pro-vscode|mon|1.1.20 vscode-apache|mrm|1.2.0 vscode-docker|ms-|1.22.0 csharp|ms-|1.25.0 python|ms-|2022.6.3 vscode-pylance|ms-|2022.6.0 jupyter|ms-|2022.5.1001491011 jupyter-keymap|ms-|1.0.0 php-docblocker|nei|2.7.0 snippet-creator|nik|0.0.5 printcode|nob|3.0.0 syncing|non|3.2.0 vetur|oct|0.35.0 laravel-blade|one|1.32.0 vscode-nuget-gallery|pat|0.0.24 vscode-php-getters-setters|php|1.2.3 material-icon-theme|PKi|4.17.0 nginx-formatter|ray|0.0.13 ruby|reb|0.28.1 php-sort-imports|red|0.0.1 phpdoc-generator|ron|1.1.1 laravel-artisan|rya|0.0.28 php-refactor-tool|st-|0.4.4 ayu|tea|1.0.5 open-in-browser|tec|2.0.0 vscode-icons|vsc|11.12.0 gitblame|wad|8.2.1 vscode-nginx|wil|0.7.2 vscode-ruby|win|0.28.0 JavaScriptSnippets|xab|1.8.0 php-debug|xde|1.26.1 (58 theme extensions excluded)
bpasero commented 2 years ago

I wonder if this issue is being caused by an installed extension. Can you try to run VS Code without extensions? From the command line (NOT the integrated terminal in Code), execute: code --disable-extensions and try your steps again to see if it reproduces. If you see it is an issue with the extension, please file it against the extension repository itself.

michaelyousrie commented 2 years ago

Correct. it was a faulty extension. Thank you so much for the prompt response and my apologies for the lack of investigation before submitting the issue. Fixed :)