topic hubAL Developmentofficial - Microsoftunreviewed - model text not yet checked

Troubleshooting in AL

Troubleshooting in AL covers tools and guidance for finding and fixing problems in Business Central extensions: the AL Profiler, VS Code debugging, snapshot debugging, Page Inspection, performance tuning for AL developers, and printing errors. It answers questions on diagnosing slow code, debugging errors, and inspecting pages.

Path: Development > Troubleshooting > Troubleshooting in AL · tier official · system development · narrative unreviewed (model text not yet checked)

Overview

This section collects the tools an AL developer uses when something is slow, wrong, or not printing. Debugging in Visual Studio Code is the base skill. It covers breakpoints, conditional breakpoints, breaking on errors or record changes, and attaching to a session. Snapshot debugging builds on it by recording execution on the server and replaying it offline.

For performance, the AL Profiler records where time is spent, using instrumentation or sampling, and shows call stacks, timings and SQL activity. The performance articles give design guidance on pages, web services, AL patterns, data access and testing. Page Inspection is a web client pane that shows page structure, source table fields, extensions and filters without reading code. A separate page covers printing problems.

Start with debugging in VS Code for functional errors. Use the AL Profiler and the performance articles for slow code. Use Page Inspection to understand what a page is built from.

Key points

  • The AL Profiler offers instrumentation and sampling modes, set up in launch.json and viewed in VS Code. It has top-down and bottom-up call stack views, SQL call tracking, a Performance Profiler page and CodeLens inline timings.
  • VS Code debugging supports breakpoints, conditional breakpoints, break on errors, break on record changes, and attach and debug next.
  • Snapshot debugging records AL execution on a server and lets you debug the recording offline in VS Code using snappoints.
  • Snapshot debugging can also be driven by an AI agent through the MCP server interface.
  • Page Inspection in the web client shows page structure, source table and fields, extensions and filters.
  • The performance articles cover page background tasks, partial records, set-based methods, columnstore indexes, SIFT indexes and Read Scale-Out.
  • Troubleshooting Printing explains how to check printer payloads and read the Windows Event Log. It also explains how to test printer setups with the Printers system table.

Learn pages

Videos and posts

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 6 Learn pages