Optimize Visual Studio code editing and building performance - Business Central (2024)

Table of Contents
In this article See also
  • Article

Visual Studio Code is built to handle many smaller dependent projects instead of one large project. However, as the base application isn't yet split into modules or components that allow managing the code in smaller projects, we recommend the following performance optimizations.

Open your settings.json file in the project (or global settings if you prefer that) selecting Ctrl+Shift+P. Set:

  • "al.enableCodeAnalysis": false to turn off code analysis completely, read more here Using the Code Analysis Tool.

  • "al.backgroundCodeAnalysis": false to turn off running code analysis in the background, but code analysis will be enabled when building with Ctrl+Shift+B. This is an alternative if analyzers are required with "al.enableCodeAnalysis": true.

  • "al.enableCodeActions": false to turn off AL Code Actions, read more here AL Code Actions.

  • "al.incrementalBuild": true to allow the compiler to reuse the existing background compilation for creating the package.

  • "editor.codeLens": false to turn off code lens in Visual Studio Code, see Code Navigation.

  • "[al]": {​​​​​​​​​​"editor.formatOnSave": false }​​​​​​​​ to turn off formatting when saving a file for AL. If you still want formatting, then you can adjust what to run formatting on, and you can choose modifications by using the Format On Save Mode option.

  • Add the build folder to the exclusion list for Windows Defender.

See also

Development in AL
Best Practices for AL

Optimize Visual Studio code editing and building performance - Business Central (2024)
Top Articles
Latest Posts
Article information

Author: Moshe Kshlerin

Last Updated:

Views: 5609

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Moshe Kshlerin

Birthday: 1994-01-25

Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

Phone: +2424755286529

Job: District Education Designer

Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.