Visual Studio Code never reopens previous file or folder
It seems, VsCode only remembers opened files, if you also have a folder opened.
It doesn't matter, if this is just a Dummy Folder somewhere on your drive - if you open files outside of this folder, they will be remembered aswell.
I'm not sure if this is as designed, or a bug.
Edit: This is a bug and tracked here
Edit 2: To sum up the answers from below there are now two settings concerning this issue:
Hot exit has been implemented, which restores files which weren't saved before VS Code is closed. To change this, use this setting:
files.hotExit: "onExit"
To reopen all files, use this setting:
window.restoreWindows: "all"
But there is still on open issue with this found here.
...
Go to:
Open File --> Preferences --> Settings and add "window.restoreWindows": "all"
to your settings.json file.
Remember to add a comma to the preceding statement.
This will reopen all the windows you had open on the close of your last session.
You could try the settings option:
"window.reopenFolders": "all"
This should reopen everything that was opened when you closed the editor, but I haven't tested it. I usually prefer that nothing gets reopened, so I use none
. The default is one
.