Thanks for sharing your findings!
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
C:\Users\%USERNAME%\AppData\Local\Packages\MartinPikryl.WinSCP_tvv458r3h9r5m\LocalCache\Localand delete the
Programsfolder or the
Microsoft VS Codefolder which is under it. Then everything should be working fine again.
Code.exewhich shows up fine in the list...
Code.exein that specific path
C:\Users\hajek\AppData\Local\Programs\Microsoft VS Code. I tried doing the same in another folder but wasn't able to reproduce it.
Code.exewithin the editor selection prompt, it didn't appear in my explorer... Only after I deleted it, it appeared in the recycle bin and after restore it was there (with no disk size, so probably some sandbox corruption).
C:\Users\hajek\AppData\Local\Programs\Microsoft VS Code\Code.exe
System Error. Code: 1392.
The file or directory is corrupted and unreadable
C:\Users\hajek\AppData\Local\Programs\Microsoft VS Code\bin\code.cmdhowever this is not much comfortable since it opens command-line.