topic hubAL Developmentofficial - Microsoftreviewed - checked by Opus

Troubleshooting in AL

Troubleshooting in AL covers tools and guidance for finding and fixing problems in Business Central extensions: the AL debugger, snapshot debugging, the AL Profiler, Page Inspection, performance articles, and printing troubleshooting. It answers questions on debugging, performance hot spots, page structure and printer errors.

Path: Development > Troubleshooting > Troubleshooting in AL · tier official · system development · narrative reviewed (checked by Opus)

Overview

This section groups the diagnostic tools an AL developer uses when something is wrong or slow. Debugging in AL covers the Visual Studio Code debugger, breakpoints and database inspection. Snapshot debugging records code on a production cloud server so it can be debugged offline. The AL Profiler records execution details to find performance hot spots.

Page Inspection works in the web client and shows page structure, source table, fields, extensions and filters without reading code. Performance Articles for AL Developers gives guidance on pages, web services, reports, AL patterns, data access and testing. Troubleshooting Printing helps with printer and report payload errors.

Start with Debugging in AL for functional errors, the AL Profiler or the performance articles for slowness, Snapshot debugging for issues that only occur in production, and Page Inspection to understand what a page shows and where it comes from.

Key points

  • Debugging in AL uses the Visual Studio Code debugger with breakpoints, conditional breakpoints, break on errors, break on record changes, SQL debugging, database locks inspection and web service debugging.
  • Snapshot debugging records AL execution for a specified user session on production cloud servers and replays it offline in Visual Studio Code using snappoints, which log variable state without stopping execution.
  • Snapshot debugging pages mention versions 17.2 and 18.1, and include built-in codeunit trigger debugging and verbosity control.
  • The AL Profiler has instrumentation and sampling modes, configured in launch.json, and shows call stacks (top-down and bottom-up), timings, SQL calls, a Performance Profiler page and CodeLens timings.
  • Page Inspection shows page structure, source table and fields, extensions and filters in the web client; its page references 2023 release wave 2.
  • Performance articles cover page background tasks, Edit-in-Excel, query objects, partial records, table extension impact and event subscriptions.
  • Troubleshooting Printing covers payload validation, the Windows Event Log, error messages and testing printers through the Printers system table.

Learn pages

  • Analyze AL Performance with the AL Profiler: Use instrumentation or sampling with the AL Profiler to analyze AL execution, SQL activity, call stacks, and performance hot spots.
  • Debugging in AL: Debugging in AL with Visual Studio Code and the AL Language extension.
  • Inspecting pages: Learn about the structure of a page and its’ underlying data.
  • Performance Articles for AL Developers: Learn how to write efficient AL code, pages, reports, and web services, and use tools like the AL Profiler to improve performance in Business Central.
  • Snapshot debugging: Overview of how snapshot debugging allows recording running AL code for Business Central.
  • Troubleshooting Printing: Dynamics 365 Business Central supports different types of events including BusinessEvent, IntegrationEvent, Global, and trigger events.

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