Business Central 2025 wave 1 (BC26): New VS Code actions from the Web Client (Generate launch configurations and Get selected as dependencies on the Extension Management)

Dynamics 365 Business Central

Hi, Readers.
The public preview for Dynamics 365 Business Central 2025 release wave 1 (BC26) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful.

This new feature is not yet documented in the Business Central 2025 release wave 1 (BC26) release plan but is mentioned in AL Language extension changelog Version 15.0

New VS Code actions from the Web Client
Two new actions have been added to the Extension Management page. One to generate launch configurations in your local AL project to match the environment, and another to select installed extensions and download them as dependencies.

https://marketplace.visualstudio.com/items/ms-dynamics-smb.al/changelog

The release plan has been updated:
Generate launch json file from the web client

Business value:
One of the feedback items on the Open in Visual Studio Code has been the request to quickly generate a launch configuration matching the specific environment. In this release we have added actions in the web client that do exactly that, making it easier to create a launch configuration to investigate or debug a specific environment in Visual Studio Code.

https://learn.microsoft.com/en-us/dynamics365/release-plan/2025wave1/smb/dynamics365-business-central/generate-launchjson-file-web-clientjson-file-from-the-web-client?wt.mc_id=DX-MVP-5004336

Select extensions to open in Visual Studio Code from the web client

Business value:
Several releases ago, we introduced the powerful ability to open Visual Studio Code from within the web client, that is, a specific environment, to investigate or debug code. We now add the ability to proactively select the extensions to include in the project when opening Visual Studio Code. If the user has permissions to access source, that code will be available in the opened Visual Studio Code. Otherwise, it will be symbols that can be used for investigating functionality in AL Explorer or to code against.

https://learn.microsoft.com/en-us/dynamics365/release-plan/2025wave1/smb/dynamics365-business-central/select-extensions-open-visual-studio-code-web-client?wt.mc_id=DX-MVP-5004336

Generate launch configurations and Get selected as dependencies:

In the most recent version, Microsoft has made a lot of efforts to allow non-developers or beginners to quickly debug or customize BC.

This time, this part of the function is enhanced again. Let’s see more details.

Choose Generate launch configuration.

Generate launch configurations
Generates the launch configurations in your local AL project in Visual Studio Code for extension development in this environment.

Choose Open Visual Studio Code.

PS: If you don’t have VS Code installed, you won’t be able to proceed to the next step. Please install VS Code first.

Choose Open.

Allow ‘AL Language extension for Microsoft Dynamics 365 Business Central’ extension to open this URI?
vscode://ms-dynamics-smb.al/co…D2252

PS: If the AL Language extension isn’t installed, the user will be asked to install it.

Then you can choose Use current project or Create a new project. This is the same as in Business Central 2023 wave 2 (BC23): Open Visual Studio Code (Debugging) from web client to investigate or troubleshoot extensions.

For example, choose Create a new project. This will automatically generate a launch.json file and point it to the current environment.

Automatically generated launch.json file:

{
    "configurations": [
        {
            "name": "AL: Generated Attach request",
            "request": "attach",
            "type": "al",
            "environmentType": "Sandbox",
            "environmentName": "Sandbox26P",
            "sessionId": 2252,
            "breakOnNext": "WebClient",
            "breakOnError": "ExcludeTry",
            "tenant": "7e47da45-7f7d-448a-bd3d-1f4aa2ec8f62"
        },
        {
            "name": "AL: Generated Snapshot request",
            "request": "snapshotInitialize",
            "type": "al",
            "environmentType": "Sandbox",
            "environmentName": "Sandbox26P",
            "sessionId": 2252,
            "breakOnNext": "WebClient",
            "executionContext": "DebugAndProfile",
            "tenant": "7e47da45-7f7d-448a-bd3d-1f4aa2ec8f62"
        }
    ]
}

Then you can download the symbol files for customization or debugging. Very simple.

PS: If you choose Use current project, the current launch.json file will be automatically updated to add the settings “name”: “AL: Generated…”

PS: You can use the Generate launch configurations for this environment action in the Troubleshooting section of the Help & Support page.

Next, let’s look at another action, Get selected as dependencies. It contains two actions.

Download in VS Code:
Adds the selected extensions to your local project”s dependencies in Visual Studio Code, and downloads the symbols for them.

Show and copy:
Formats the selected dependencies as a json array and displays them in a dialog window.

As you might know, when we develop for Business Central, we need to download the symbol files first. These contain the source code of the standard functions.

But if we want to extend other extensions, the default symbol file will not meet our needs. We need to add dependencies settings in the app.json file. For example,

After downloading symbols again, you can download their app files.

More details: App.json file

SettingMandatoryValue
dependenciesNoList of dependencies for the extension package. For example: "dependencies": [ {"id": "00001111-aaaa-2222-bbbb-3333cccc4444", "name": "WeatherLibrary", "publisher": "Microsoft", "version": "1.0.0.0"},{}].
Note: For dependencies to the System Application and Base Application, these are no longer listed as explicit dependencies, but captured in the application setting as a reference to the application package. They must have a version number of the Application package. See application below.
Note: The version specified defines the minimum version for the dependency. At runtime and when downloading symbols, the latest version of the dependency satisfying the specified name, publisher and, minimum version is returned. When runtime is set to 4.0 or earlier, use appId instead of id.

PS: How to get field values from other extensions/apps in Business Central without adding dependencies property

The same goes for standard apps, such as “SAF-T”.

But each addition must be made manually, and requires the extension’s ID, name, publisher, and version number. It can usually be found in Extension Uninstallation. Then we manually add it to the app.json file.

This update simplifies this step.
Choose Download in VS Code.

Choose Open in VS Code

Choose Open.

Allow ‘AL Language extension for Microsoft Dynamics 365 Business Central’ extension to open this URI?
vscode://ms-dynamics-smb.al/ad…63%3B

Then you can find that the dependencies property in the app.json file has been automatically added and the symbol file starts to be downloaded automatically.

Done.

And choose Show and copy to manually copy the contents that can be set in the dependencies property. You can copy manually.

Support multiple selection:

Small update, but it makes life easier. Give it a try!!!😁

PS: If you are interested in the standard code, you can check out the codeunit below.
codeunit 8334 “VS Code Integration”: The scope of all procedures is set to OnPrem

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL