Editar

Partilhar via


AL Language extension configuration

APPLIES TO: Business Central 2019 release wave 2 and later

Note

We're working on improving the onboarding experience for AL developers. If you've input for this article, we'd love to hear from you. Please use the Feedback section at the bottom of this article to help us make improvements that you’d like to see.

We also welcome contributions to our docs. New to contributing to docs? Don't worry, read more about contributing here Contribute to the help.

The AL Language extension has many settings that can be defined for a specific user or for a workspace. To activate the settings, press Ctrl+Shift+P, and then choose Preferences: Open Settings (UI) for workspace settings, or choose Preferences: Open User Settings for user settings. Under Extensions, and AL Language extension configuration, you'll find the settings that are available for the AL Language extension. If a setting is not available through the UI, you can edit it directly in the settings.json file. For tips on how to optimize Visual Studio Code, see Optimizing Visual Studio Code for AL Development.

Settings

The following table describes the user and workspace settings for the AL Language extension:

Setting Value
AL-Go Suggested Folder Sets the suggested folder when using AL:Go! command. Can be set per user or per workspace.
Are Profile Lenses Supported Enables the Profiler CodeLens for AL, default value is true. Syntax is "al.areProfileLensesSupported": true. For more information, see AL Profiler Overview.
Assembly Probing Paths Sets the list of directory paths where the compiler searches for referenced .NET assemblies. For example: "al.assemblyProbingPaths": ["./.netpackages", "C:/Program Files/Assemblies"]
Background Code Analysis Specifies whether the code analysis should be performed in the background. From runtime 11.0, this setting has three different options;
File (default), which performs analysis in the background
Project, which forces analysis to be performed on the entire project, with a significant performance penalty - advised only for high-performance machines
None, which switches off background analysis entirely, so that it'll only run during a full build
For more information, see Code analysis performance configuration.
Browser Specifies the browser in which to open the Business Central client when launching the application from Visual Studio Code.
Code Analyzers Sets the list of paths to code analyzers to use for performing code analysis. For example: "al.codeAnalyzers": ["${AppSourceCop}", "${CodeCop}"].
Compilation Options Specifies the compilation options;
continueBuildOnError - specifies if build should continue even if errors are found. The default and recommended value from a performance point of view is false. Set the value to true to continue building the project, even if errors are found. It requires al.incrementalBuild to be false.
delayAfterLastDocumentChange - specifies the number of milliseconds to wait after the last buffer changes before getting document diagnostics. After changing the value of this option, you must restart Visual Studio Code for it to take effect. Default value is 800.
delayAfterLastProjectChange - specifies the number of milliseconds to wait after the last buffer changes before getting complete diagnostics. After changing the value of this option, you must restart Visual Studio Code for it to take effect. Default value is 4000.
maxDegreeOfParallelism - specifies the maximum number of concurrent tasks the compiler should use when compiling the project. Default value is 2.
parallel - controls whether to use concurrent builds. Default value is true.
generateReportLayout- controls whether the compiler will generate Report Layout files when building the package. Default value is true.
outFolder - Specifies the folder where the compiler should place the resulting .app file. If not specified, the compiler will place the resulting .app file in the project folder.
Editor Services Log Level Sets the logging verbosity level for the AL Language Editor Services host executable. Possible values are Verbose, Normal, Warning, and Error.
Editor Services Path Specifies the path to the Editor Services host executable.
Enable Code Actions Specifies whether code actions should be enabled for all source files in the current project. Default is false.
Enable Code Analysis Specifies whether code analysis should be performed for all source files in the current project. Default is false. If this is set to true, you must specify the Code Analyzers setting with the list of code analyzers to use.
Enable External Rulesets Allows the use of URLs as the location of project rulesets or included rulesets. Syntax is "al.enableExternalRulesets": true.
Enable Script IntelliSense Specifies whether IntelliSense should be enabled for control add-in script files. Turn this off, if it interferes with advanced JavaScript or TypeScript configurations. Default is true.
Incognito Specifies whether to open the browser in Incognito/InPrivate mode when launching the application from Visual Studio Code. This option will take effect only if the Browser option is set to a non-default value.
Incremental Build Specifies whether a project, when it's built using Ctrl+Shift+B, or Ctrl+F5, or F5, will reuse the last known tracked compilation, which will enhance the compilation time significantly. For more information about project to project references, see Working with multiple projects and project references.
Note: Setting this to true won't do an end-to-end build, as it's depending on an already-compiled state. To get a clean, full build, this flag must be set to false. Default is false.
Important: If this setting is enabled, then all translations will be ignored, even though the "features": [ "TranslationFile" ] setting is specified in the app.json file. For more information, see Working with Translation Files.
Inlayhints > Function Return Types Switch on/off inlay hints for implicit return types on method signatures.
Inlayhints > Parameter Names Switch on/off inlay hints for parameter names.
Output Analyzer Statistics Specifies whether code analyzer performance statistics will be output when running a build.
Package Cache Path Sets the directory path where reference symbol packages are located. With Business Central 2023 release wave 1, you can specify multiple file locations for symbol packages. If you specify multiple paths, the first entry is used as the directory to store the downloaded symbols. Syntax is "al.packageCachePath": ["./.alpackages", "./.alternativePackages"].
Profiler Colors Specifies the colors used to define the application types in the profiler output. Accepts valid color names, hex codes, and rgba() values. The properties are systemApplication - default color green, baseApplication - default color magenta, and extension - default color yellow.
Publisher Sets the publisher name.
Root Namespace Sets the root namespace name.
Rule Set Path Sets the path to the file containing the customized rules to use when running code analysis. For more information, see Ruleset for the Code Analysis Tool.
Semantic Folding: Enabled Controls if the extension should provide the folding ranges, or if the strategy from Visual Studio Code should be used. Reload Visual Studio Code after changing this setting. Syntax is al.semanticFolding.enabled.
Show Explorer at Startup Specifies whether the AL Explorer is shown at startup. Options are: Always, Never, and Once. Default is Once. Syntax is al.showExplorerAtStartup.
Show Home at Startup Specifies whether the AL Developer Home is shown at startup. Options are: Always, Never, and WhenUpdated. Default is WhenUpdated. Syntax is al.showHomeAtStartup.
Snapshot Debugger Lines Hit Decoration Specifies the decoration values for a line that is hit by the snapshot debugger. Syntax is al.snapshotDebuggerLinesHitDecoration.
Snapshot Debugging Path Sets the directory path where the snapshot debugger sources are located. Default is ./.snapshot.
Snapshot Output Path Sets the directory path where snapshot files are saved. Default is ./.snapshots.
Statement Lens Minimum Sets the lower limit for the time spent on statement execution expressed in milliseconds. Default value is 500. Syntax is "al.statementLensMin": 100. For more information, see AL Profiler Overview.

AL development environment
Debugging in AL
JSON files
Working with multiple projects and project references