How to connect Visual Studio code with Dynamics 365 Business Central On-premise

Published on July 21, 2021

Need to connect Visual Studio Code to your on-premise Business Central? This step-by-step guide walks you through setup, debugging, and streamlining development. Whether you're customizing workflows or building extensions, the right integration saves time and reduces errors. Our Business Central consulting services help businesses optimize their ERP systems for efficiency and growth. Let’s simplify your development proces starting with VS Code.

Step 1: Install the visual studio code and extensions

The following VS code extensions are to be identified, installed and enabled in your visual studio code

  1. AL language- AL development tools for Dynamics 365 Business central
  2. AL language Tools- Tools for a better BC development experience (Dynamics 365 Business Central)
  3. AL object designer- Object designer optimized for (Dynamics 365 Business Central) AL language development
  4. AL snippets-gives you a template for the specific object type
  5. AL Toolbox- adds the region functionality to the Microsoft AL language for Business central
  6. AL Extension pack- Everything you need for AL development (Microsoft Dynamics 365 Business Central)
  7. AL Formatter- Formatting AL code, fixes indenting, casing and variable sorting
  8. AL variable helper- Intellisense to assign correct variable names in AL
  9. AL Studio-Visual editor/navigation tools for AL development
We help companies gain more from Business Central.

Step 2: Use shortcut key CTRL + SHIFT + P to open the command pallet. Search for the command AL: Go to open a new project

Connecting Visual Studio Code With Business Central On-Premise-1

Step 3: Assign a name to your project. Each project will have app.json created which contains the version and page id of the project

Connecting Visual Studio Code With Business Central On-Premise-2

Step 4: Select server as Your own server. This will create launch.json which has the server details

Connecting Visual Studio Code With Business Central On-Premise-3

Step 5: Mention the server, server instance and port number of your server in launch.json

Note: The server, server instance and development port number of the server can be viewed in the business central administration tool.

Connecting Visual Studio Code With Business Central On-Premise-4

Step 6: Enable the developer service endpoint in the administration tool

Connecting Visual Studio Code With Business Central On-Premise-5

Step 7: After enabling the developer service endpoint restart your service

Step 8: After making the above changes, open the previously created project in VS code. The error will be viewed in the sample helloworld program. Use shortcut key CTRL + SHIFT + P to open the command pallet and search for the command AL: Download symbols

Connecting Visual Studio Code With Business Central On-Premise-6

Step 9: On running the above command, the objects and extensions of Dynamics 365 Business central will downloaded

Connecting Visual Studio Code With Business Central On-Premise-7

Step 10: Open Dynamics Business central administration and select your server instance (Ex: BC170_PROD) and click edit

Connecting Visual Studio Code With Business Central On-Premise-8

Step 11: Set your Web Client Base URL (Ex: http://localhost:8080/BChow-to-connect-visual-studio-codesual-Studio-code/9.png" alt="Connecting Visual Studio Code With Business Central On-Premise-9"/>

Step 12: To publish the project, use shortcut key F5 in VS code. Once published, the following output will be viewed in Business central

Connecting Visual Studio Code With Business Central On-Premise-10

We help companies gain more from business central.