This topic describes an issue concerning the parallel execution of procedures that can occur during debugging of standard AMDPs as well as during debugging of CDS table functions. In particular, you could take this issue into account while debugging table functions that are used in unions and joins.
Depending on your chosen debugger settings and breakpoints, it is possible that only some of your procedures are executed in debug mode, while others are executed in optimized mode.
More on this: AMDP Debugger Settings
Procedures that run in optimized mode can potentially trigger parallel execution of called procedures. These parallel executions can then have an impact on debugging.
Procedure A calls procedure B multiple times.
Procedure A runs in optimized mode, while procedure B runs in debug mode. The source code of procedure B contains a breakpoint.
The multiple calls of the procedure B are executed in parallel threads at the same time.
The AMDP debugger then stops all parallel thread executions of procedure B, but only the first one is accessed by the debugger for the variable inspection and user commands.
The main impacts on debugging are as follows: