Debugging in AL
Debugging is the process of finding and correcting errors and performance bottlenecks by observing variables, SQL statistics, and data while running code. Business Central uses the debugger from Visual Studio Code, controlled by specific settings in the launch.json
file. The launch configurations that we use for publishing our code are also valid for debugging.
The symbols in our .alpackages
folder must match those in the environment we intend to debug in. If they do not, we must either publish our changes first or download the symbols from the environment.
Note
Full documentation of the debugging capabilities can be found in the Debugging in AL Microsoft docs article (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-debugging).
Before we activate the debugger for the first time, we must decide when exactly the code execution should be stopped. Without any breakpoints, the code runs without interruption when the debugger...