Post

Business Central AL Development in GitHub Codespaces

GitHub Codespaces for AL development in Business Central is now production-ready. A practical overview of setup, benefits, and current caveats.

Business Central AL Development in GitHub Codespaces

On April 1st, Microsoft published official Learn documentation for using GitHub Codespaces for AL development in Business Central.

That is a nice milestone. A few years ago, community experiments with AL in the browser were still limited. Some things did not work, or needed workarounds because the AL extension was not really ready for Linux-based environments. That has changed. Native Linux support for the AL extension makes Dev Containers and Codespaces much more realistic today.

The basic idea is simple: add a .devcontainer/devcontainer.json to your repository and let GitHub create a ready-to-use VS Code environment in the browser.

Good starting points are:

What You Get

My first impression: it works quite well for normal sandbox development. The environment comes pre-loaded with AL, PowerShell, and the usual GitHub tooling without installing anything locally.

The real wins are simplicity and consistency. Every developer gets the same environment right away, which is especially useful for onboarding. No more ā€œworks on my machineā€ problems.

The Preview Extension Catch

There is one caveat: preview development.

If you work with preview sandboxes or preview containers, you usually need the prerelease AL extension. The Microsoft BCApps example uses the prerelease AL extension and also enables the new VS Code authentication setting:

1
"al.useVsCodeAuthentication": true

At the moment, there is still an open authentication bug with the prerelease AL version. Connecting to sandboxes outside your own tenant (?) can fail.

I found that authentication was unreliable. Sometimes it worked, sometimes it didn’t. Here’s what helped:

  1. Run AL: Clear Credentials (from the command palette)
  2. Reload the VS Code window
  3. Download symbols again to trigger the sign-in flow

If your Microsoft account appeared in the VS Code Accounts menu (bottom-left corner), authentication usually worked afterwards :).

Current Status

GitHub Codespaces for Business Central is already very usable with the stable AL extension. For preview work, keep an eye on the open AL issue #8223.

This post is licensed under CC BY 4.0 by the author.