Automatic backup is one of the often overlooked but really cool features of Visual Studio Code (VS Code). Nowadays, it is found in various software, such as the online Microsoft suite.
This feature can enhance our development experience by ensuring that your changes are saved regularly. There’s nothing more frustrating than losing an hour of work because the PC crashed or due to a mistaken action.
How to enable automatic backup in VS Code
Nothing could be simpler: Through the File menu, click on Auto Save. This is to enable automatic backup!
This second method gives you control over when automatic backup occurs.
By accessing the settings via File > Preferences > Settings (or CTRL+,). Search for Auto Save.
Details on possible values:
- off: Automatic backup is disabled
- afterDelay: Backup occurs after x milliseconds
- onFocusChange: Backup occurs when the window loses focus
- onWindowChange: Backup occurs as soon as you click in another window
There you go, that’s all for this very short article. After all, we’re not going to philosophize about this tiny but nice feature.