Editar

Partilhar via


Optimize Visual Studio Code for AL development

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.

Development in AL
Best Practices for AL