The Debugger in the ADT is an important diagnostic tool that you can use to analyze an ABAP application.
With the Debugger, you can determine why a program is not working correctly by stepping inside the program at runtime. This allows you to see the statements being executed and the changing value of values of variable as the program proceeds.
To use the Debugger, you first decide where to start the Debug process. One way is to set breakpoints in the source code, run you program and stop at that set breakpoint.
Some of the features in the Debugger that are available are as follows:
Features of the ADT Debugger
|Watchpoints||Yes (Depending on release)|
|Stepping through code||Yes|
|Displaying variable values||Yes|
|Analyzing internal tables||Internal table rows can be displayed and edited in the ABAP Internal Table view, but the view can be customized.|
|Displaying structures||Structures can be displayed by field, but the view cannot be customized.|
|Displaying objects||Structured display of object contents is supported, but the capabilities for customizing the data display of the Objects tool are not offered.|
|Comparing data objects||not for complex data objects|
|Analyzing memory use||No|
|Change debugger settings||Yes|
|Direct editing of code in the debugger||Yes|
Debug an ABAP Program using ADT
When you debug an ABAP Program using ADT, you use the Debug perspective. This is a customized version of the standard Eclipse Debug perspective, and it contains views and functions that are particularly important for debugging.
Some important elements of the debugger perspective are as follows:
- Source Code View
The Source Code view is the central part of the debugger perspective. It displays the source code and highlights the current position in the program.
- Variables View
The Variables view is also very important. You use this view to display the current values of variables of variables.
- Breakpoints View
The Breakpoints view is displayed next to the Variables view (not selected in the preceding figure, Debug Perspective). You use this view to display, delete or create breakpoints. Breakpoints are points in the program at which normal processing is interrupted and the system shows you the Debugger so that you can analyze the state of the program at exactly that moment.
- Navigation Functions
While you are debugging a program, you use the navigation functions to control the execution of the code.
- Debug View
The Debug view on the upper left shows the debugging session and the call hierarchy. You will need this later when you debug calls of modularization units, for example, methods.
- Perspective Selector
You can switch back to the ABAP perspective with the Perspective Selector buttons in the upper right corner.