Top 5 This Week

Related Posts

VScode Auto Save : D365 Business Central

How to enable auto save in vs code ?

Did you know that you can now activate Auto Save coding on VSCode ( Visual Studio Code ) for Business Central AL Programming? Surprisingly, this feature has been around for quite some time. Yet, in conversations with many tech enthusiasts, I discovered that most are still unaware and sticking to the old Ctrl + S method for saving code. If you’re just diving into the Auto Save feature in Visual Studio Code, fret not about manual saves! This is a game-changer, preventing those code losses that occur when we forget to save by default.

VS Code acts as a versatile and powerful code editor for seamless development. By default, whenever you try to close the coding window, it will throw a popup message prompting you to save the code, like the following.

Manual VSCode Saving required Warnning message box

How to Activate Auto Save in VS Code

You may activate vscode automatic save using any of the following options

Option1 : Auto Save Activation From File Menu

This is the easiest method to activate the Auto Save option in Visual Studio code AL coding platform.

In order to activate the Auto Save feature using this method, go to File -> Save option as shown in the following image. By default, the Auto Save option with the selection will not be visible. However, when you click on it, it will allow you to activate the feature. Similarly, clicking again will deactivate it.

Before VSCode Auto Save Activation

Visual Studio Code Auto Save before activation
Visual Studio Code Auto Save before activation

After VSCode Auto Save Activation

VSCode Auto Save After activation from Menu option
VSCode Auto Save After activation from Menu option

Option 2 : VSCode Auto Save Activate from Visual Studio Code Settings

This is the second type of activation of Auto Save feature on VSCode AL program.

VS Code Setting Opening

VS Code Settings opening option
VS Code Settings opening option

Auto Save Activation Setting

Activate Auto Save in VSCode from Settings
Activate Auto Save in VSCode from Settings

files.autoSave can take the following values:

off: Disables auto-save.
afterDelay: Saves files after a configured delay (default 1000 ms).
onFocusChange: Saves files when focus shifts away from the editor of a dirty file.
onWindowChange: Saves files when the focus moves out of the VS Code window.”

Option 3 : Auto Save Activation Using settings.json file

For activating using this option you open settings.json file and then required to add following set of code.

settings.json file with VS Code Activation option enabling
settings.json file with VS Code Activation option enabling
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000

file auto save can following option this settup as well.

off: Disables auto-save.
afterDelay: Saves files after a configured delay (default 1000 ms).
onFocusChange: Saves files when focus shifts away from the editor of a dirty file.
onWindowChange: Saves files when the focus moves out of the VS Code window.”

I hope this content is useful to help you gain knowledge on how to enable AutoSave in the VS Code interface. If you have any further concerns, feel free to comment here.

FAQ : VSCode Auto Save Enabling

✅ How to auto save in visual studio code?

You may activated the auto save feature in Visual Studio code using 3 different options. All the options are explained in this post.

✅ How to enable auto save in visual studio code?

Although there are multiple options explained in this post, the simplest method to enable it is from the File menu. Have a view on detailed settings image given on this post.

✅ How to stop auto save in visual studio code?

Easy method to disable or stop auto Save settings on VS Code is from the File->Auto Save option

Business Central Complete Version List and Direct Download

Jubel
Jubelhttps://www.navisionplanet.com
Jubel Thomas Joy, a 16+ year Microsoft Dynamics 365 Business Central/NAV/Navision expert, founded "Navision Planet" in 2009. Certified in Business Central , D365 - Commerce and many more. He blogs on the latest updates and various modules of Business Central & LS Central, showcasing expertise in SQL, Microsoft Power Platforms, and over 150 organizations of work experience.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Popular Articles