microsoft / vscode

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

File content is replaced with undefined when saving #188054

Closed ayoubkhan558 closed 1 year ago

ayoubkhan558 commented 1 year ago

Type: Bug

when I save the file, whole content of file is erased and undefined is written in vscode.

VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:22:07.651Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz (4 x 2904)| |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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.88GB (4.68GB free)| |Process Argv|--crash-reporter-id 0e1a26ca-05a8-44cf-95ef-0ebd6f6e59cc| |Screen Reader|no| |VM|0%|
Extensions (49) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 vscode-javascript-snippet-pack|aka|0.1.6 project-manager|ale|12.7.0 copy-relative-path|ale|0.0.2 vsc-export|asl|1.2.0 vscode-intelephense-client|bme|1.9.5 bemhelper|Box|1.4.5 vscode-tailwindcss|bra|0.9.11 simple-react-snippets|bur|1.2.7 vscode-eslint|dba|2.4.2 fold-level|den|0.0.2 phptools-vscode|DEV|1.36.13417 profiler-php-vscode|DEV|1.36.13417 jquerysnippets|don|0.0.1 bracket-pair-toggler|dzh|0.0.3 prettier-vscode|esb|9.19.0 vscode-atom-sass-snippet|glu|0.0.3 extension-pack-manager|hay|0.2.1 ftp-simple|hum|0.7.6 vscode-placeholder-images|Jak|0.1.0 diff-tool|jin|0.0.1 scss-bem-support|jol|0.0.8 auto-comment-blocks|kev|1.0.1 banner-comments-plus|lun|0.3.1 sortlengthyimports|mar|0.0.5 change-string-case|max|1.1.2 vscode-fileheader|mik|0.0.2 vscode-autoprefixer|mrm|3.0.1 js-debug-nightly|ms-|2023.7.1417 custom-css-sorter|Nac|0.5.0 nojquery-snippets|Nkz|0.1.3 remove-comments|pli|1.2.2 vscode-css-peek|pra|4.4.1 snippets-manager|pro|0.0.4 text-power-tools|qcz|1.41.0 html-to-jsx|ria|0.0.1 format-html-in-php|rif|1.7.0 color-manager|roy|0.7.5 bootstrap5|shr|0.0.9 svg-preview|Sim|2.8.3 snippets|tah|3.0.0 alphabetical-sorter|ue|2.0.1 reactjssnippets|var|2.0.1 vscode-icons|vsc|12.4.0 vscode-webhint|web|2.1.11 vscode-import-cost|wix|3.3.0 JavaScriptSnippets|xab|1.8.0 format-all-files|xyk|0.2.0 markdown-all-in-one|yzh|3.5.1 (4 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263cf:30789497 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30610679 2e4cg342:30602488 pyind779:30671433 89544117:30613380 pythonsymbol12:30671437 showlangstatbar:30737416 vsctsb:30748421 pythonms35:30701012 03d35959:30757346 pythonfmttext:30731395 pythoncmvfstrcf:30756944 fixshowwlkth:30771522 hideindicator:30785051 pythongtdpath:30769146 bgfeh915:30780428 pythonnosmt12:30779714 pythonidxpt:30784022 pythonnocebcf:30776496 e537b577:30786199 dsvsc013:30789517 ```
gjsjohnmurray commented 1 year ago

/confirmPlease

VSCodeTriageBot commented 1 year ago

Please perform the following three tasks to diagnose the root cause of the issue:

Then pick one of the three resolutions depending on which step has helped:

Disabling my Extensions helped Please run the command `Start Extension Bisect` and follow the instructions to find the extension that is causing this issue. image Please report the issue to the extension causing this.
Disabling my configuration helped Please report back more details about your configuration, including settings.
Using VS Code Insiders has helped โœ… This likely means that the issue has been addressed already and will be available in an upcoming release. You can safely use VS Code Insiders until the new stable version is available.
ayoubkhan558 commented 1 year ago

I tried VS Code insider, Now its working fine.

lramos15 commented 1 year ago

Sounds extension related then.

ayoubkhan558 commented 1 year ago

I have synced same extensions which I was syncing with VS code stable. The problem occurs when I save files, Now it does not write undefined, it formats file unexpectedly.

ayoubkhan558 commented 1 year ago

when I tried "Disable Configuration" or "Disable Extensions" now its fine, no problem.

Here is VS code profile https://insiders.vscode.dev/profile/github/5c9838e10757b14525fa50a78c7f78a3

ayoubkhan558 commented 1 year ago

https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one

this was the extension causing the issue.