Visual Studio Code always reopens previous file or folder

前端 未结 8 1984
心在旅途
心在旅途 2020-11-30 01:43

VSCode always seems to remember my session and reopen the files and/or project that were open the last time I used it. It obviously behaves correctly when running it from th

相关标签:
8条回答
  • 2020-11-30 02:13

    If "window.restoreWindows": "none" not solve the problem,
    then try to run code as root -> sudo code --user-data-dir code files and restart code normally without root.

    0 讨论(0)
  • 2020-11-30 02:15

    For me, none of above is working while I'm trying to close "dirty" unsaved files which I accidentally edited 1000 files and wanted to ignore saving all of them.

    My fix was adding this line into settings.json:

        "files.hotExit": "off"
    

    Open up vscode, close vscode and just click the confirmation button to close all of the files without saving.

    Then open back vscode and boom.. no more unsaved files being shown.

    0 讨论(0)
提交回复
热议问题