For this exercise, we will restrict ourselves to ABAP Debugger with respect to SAP S/4HANA Cloud ABAP Environment – developer extensibility.
ABAP Debugger – Debug Perspective
The Debug perspective supports application debugging by providing views for displaying the debug stack, variables and breakpoints.
When a breakpoint is activated, the ABAP Development Tools (ADT) will launch the debug perspective in the IDE.
Debug perspective can be accessed via menu option Window → Perspective → Open Perspective → Other → Debug.
Let’s get a quick overview of the debug perspective.
The navigation toolbar on top of the debug perspective lets you control execution in the debugger, stepping through your code, resuming or canceling execution.

The debug view also shows you the active call stack. You can click on entries in the call stack to open the code at that level of the stack. You can then inspect active variables, set breakpoints, or edit your code.
You also get variables and breakpoints on different tabs.

Double-clicking a variable in the source code editor shows you the value and attributes of the variable in the Variables view.
In the Breakpoints view, you can see the list of active and inactive breakpoints
Double-click on a breakpoint to jump to its location in the source code. Mark or unmark a breakpoint to activate or deactivate it. Any such changes are effective immediately in the current debugging session.
The editor displays the code that you are debugging. You can follow debugger execution in the code, show the values of variables by hovering with the cursor over them, or open them in the variables view by selecting them.
You can correct mistakes in your coding directly in the editor; there is no need to switch to the ABAP perspective to edit your code. However, due to the restrictions in the SAP S/4HANA Cloud ABAP environment, you cannot change the values of the variables.
Exercise for Debugging the Implemented BAdI
Prerequisites
Steps
Put a new breakpoint in the implemented BAdI.
Go to the previously created purchase requisition.