Home > Blockchain >  I'm new to coding but when I exit Visual Studio Code it must auto-save
I'm new to coding but when I exit Visual Studio Code it must auto-save

Time:12-21

I'm new to coding but when I exit Visual Studio Code it must auto-save.

I have made changes to my code which is now causing problems, I think it's because it has updated the file widget_test.dart - is it possible to UNDO these changes and go back to a working version at all, Edit > Undo won't undo it probably because I exited Visual Studio Code before I realised there was a problem? Thank you

CodePudding user response:

Sorry, you can't undo it because you quit Visual Studio Code. Visual Studio Code only allows you to undo code changes you made this time you opened it. I suggest you take a look at this YouTube video on how to pop up a dialog asking you to confirm before exiting.

Press Command Shift P and enter Open Settings and open the settings.json file. The setting is called window.confirmBeforeClose and can have 2 notable options:

  • keyboardOnly

  • always

You should always type because the always option will bring up a confirmation dialog whenever you try to quit the application, whether through a keybinding or with the mouse.

  • Related