Running in debug mode
The basic concept behind debugging is to step through code execution, typically one statement at a time. A breakpoint is a mark that you can set on a statement to indicate where the debugger enters into the code execution. When the program flow hits the statement, the debugger kicks in and suspends execution (technically, it breaks) until instructed to continue. Without any breakpoints, the code would run just fine as long as the debugger is active.
The debugger will automatically stop the execution of the code only when it encounters an error, or if it has been instructed in the launch.json
file to break on record writes.
A developer could also use the debugger to find potential logic errors since the debugger enables them to execute AL code syntax, one statement at a time, while inspecting the contents of variables at each runtime step. In this way, the developer can compare the runtime code execution against what they intended when they wrote the code...