Work with development tools
Toolchain
Know which Visual Studio Code capability solves which problem.
- AL Language extension: compiles, publishes, and provides AL: Download Symbols, AL: Publish to Environment, AL: Publish without Debugging.
- launch.json: environment, tenant, breakOnError, startup object, and the snapshot configuration block.
- AL Test Runner: discovers and runs test codeunits and reports code coverage. Tests execute in a test company on a sandbox using the test toolkit libraries (Any, Library Assert, and the rest).
- Snapshot Debugger: captures the call stack and variable values at chosen breakpoints, including Break on Record Write for Insert, Modify or Delete. You need a sandbox with snapshot debugging enabled and you must download the snapshot result afterwards. It is not available on production.
- AL Performance Profiler: identifies slow statements and shows the SQL they generate.
- Event Recorder and Event Mover: part of the test toolkit; they record raised events so a test can assert an event was published.
- Page Inspection in the web client: shows the page, source table, filters and which extensions added a given field - the fastest way to trace an unexpected value.
- Telemetry: Application Insights queried with KQL, used for production errors, long-running operations and extension lifecycle events.
- BcContainerHelper: PowerShell module for Docker-based on-premises environments, also used by AL-Go.
Rule of thumb: a production problem you cannot reproduce - enable telemetry first; if you can reproduce in a sandbox, use the snapshot debugger.
Traps: trying to enable snapshot debugging on production; expecting code coverage from a normal debug session (you need the test runner); confusing environment telemetry with the Event Recorder; forgetting that page inspection needs the web client, not VS Code.