Exercise: Debugging the Custom Code via Debug Perspective

After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Debug a previously created developer extension via Debug Perspective by setting breakpoints

Eclipse-Based ADT Development Environment, Debugger, and Troubleshooting

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 WindowPerspectiveOpen PerspectiveOtherDebug.

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



  1. Put a new breakpoint in the implemented BAdI. 

  2. Go to the previously created purchase requisition.  


Log in to track your progress & complete quizzes