Chapter 2: Setting Up Your AL Development Environment
Objectives
By the end of this chapter you will be able to:
- Explain the minimum local prerequisites for AL development
- Create a new AL project in Visual Studio Code
- Configure a sandbox connection safely in
launch.json - Validate your environment before writing extension logic
2.1 Core prerequisites
To develop in AL you need four things:
- Visual Studio Code
- The AL Language extension (from Microsoft)
- A Business Central sandbox environment
- A user account with permission to publish and debug
If any of these is missing, later chapters may fail for reasons that have nothing to do with your AL code.
2.2 Create and initialize a project
Run AL: Go! from the VS Code command palette to scaffold the extension project. It generates baseline files such as app.json, .vscode/launch.json, and object folders.
Once the files are generated, check that:
app.jsonhas a unique app ID and a sensible name and version.- Your object ID range matches the training objects you plan to create (see Chapter 11).
2.3 Configure and validate launch.json
Point launch.json at your sandbox environment and tenant, then press F5 to run a first publish.
To keep these first runs safe, use a dedicated sandbox, not production, and confirm that the authentication settings are correct. If the connection fails, sort that out before you write any business logic.
2.4 Environment validation checklist
Before you move on to Chapter 3, check that:
- The AL extension is installed and active.
- Symbols download successfully.
- The first publish works without object conflicts.
- You can set and hit a basic breakpoint.
That way you won’t end up chasing “code bugs” that are really setup issues.
Chapter summary
In this chapter you:
- Identified the tools, permissions, and environment access you need
- Scaffolded an AL project with AL: Go!
- Configured the sandbox launch settings and checked that publishing and debugging work
- Put together an environment checklist to repeat before you start coding
Tasks
- Project bootstrap. Create a new AL project and verify
app.jsonexists. - Connection validation. Configure
launch.jsonand complete one successful publish. - Debug readiness. Set a breakpoint in any procedure and verify debugger attach works.
- Try it yourself. Document one environment failure you hit and how you resolved it.
Check your work: if Chapters 3, 7, and 9 later fail to run, re-run this chapter’s checklist before changing business logic.