Thursday, November 5, 2020

Configuration: AL Language Extension


Business Central AL Language extension has a number of settings that can be specified 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 will find the settings that are available for the AL Language extension. For tips on how to optimize Visual Studio Code, see Optimizing Visual Studio Code for AL Development.

APPLIES TO: Business Central 2019 release wave 2 and later

Example: 

{
    "al.defaultLaunchConfigurationName""localhost",
    "al.codeAnalyzers": [
        "${CodeCop}",
        "${UICop}",
        "${AppSourceCop}"
    ]
 }

Below are details of setting which you can apply and use in your app development:

SettingValue & Details
Assembly Probing PathsSets the list of directory paths where the compiler searches for referenced .NET assemblies. For example: "al.assemblyProbingPaths": ["./.netpackages", "C:/Program Files/Assemblies"]
BrowserSpecifies the browser in which to open the Business Central client when launching the application from Visual Studio Code.
Code AnalyzersSets the list of paths to code analyzers to use for performing code analysis. For example : "al.codeAnalyzers": ["${AppSourceCop}", "${CodeCop}"].
Compilation OptionsSpecifies the compilation options; generateReportLayout, which controls whether report layout files are generated during build and parallel, which controls whether to use concurrent builds. Both options are default set to true.
Editor Services Log LevelSets the logging verbosity level for the AL Language Editor Services host executable. Possible values are Verbose, Normal, Warning, and Error.
Editor Services PathSpecifies the path to the Editor Services host executable.
Enable Code ActionsSpecifies whether code actions should be enabled for all source files in the current project. Default is false.
Enable Code AnalysisSpecifies 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.
IncognitoSpecifies 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.
Package Cache PathSets the directory path where reference symbol packages are located.
Rule Set PathSpecifies whether a project, when it is built using Ctrl+Shift+B, 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 will not do an end-to-end build, as it is depending on an already-compiled state. To get a clean, full build, this flag must be set to false. Default is false.
Snapshot Output PathSets the directory path where snapshot files are saved. Default is ./.snapshots.
Snapshot Debugging PathSets the directory path where the snapshot debugger sources are located. Default is ./.snapshot.

Blogpost Source: Microsoft Docs

No comments:

Post a Comment