Debugging
The Dynamics 365 Business Central AL Language extension provides a debugger to help developers check, correct, and modify code so that custom extensions can build successfully, deploy smoothly, and act as expected.
Debugging can be done synchronously or asynchronously by collecting snapshots and analyzing them afterward. The purpose of the snapshot is to replay code execution for offline analysis. Together with debugging, it is also possible to analyze code performance by collecting AL profiler traces. Profiler traces can be collected using Visual Studio Code or directly from the client (in-client profiling).
There are also some useful external tools that can be used to analyze AL profiler traces.
This chapter will cover the following topics:
- Running the AL Language extension in debug mode
- Debugging in attach mode
- Snapshot debugging
- Performance profiling