Debugging is Eclipse ADT is a little different as that of Classical SAP GUI debugging. Eclipse provides a dedicated separate “Debugger Perspective” for debugging purpose. Debugger perspective, just like other perspectives, has many views for different purposes.
Note: There is no need to open Debugger perspective separately as Eclipse runtime automatically determines if Debugger perspective needs to be opened(on encountering a breakpoint) and it offers a pop-up for the information that the Perspective will be changed from ABAP perspective to Debug perspective.
Refer Diagram 1 & 2 for an idea of look & feel:
Introduction of Eclipse Debug Perspective:
- Debug Hierarchy View: This view Displays the hierarchy SAP system, SAP server which provides debugging service, User who is debugging and Code metadata which is being debugged.
- Source Code View: This is one of the most important views of Debugger Perspective. Source Code view shows the written code and interestingly, in Eclipse, Code can be edited and activated(on the fly) in Debugger perspective itself. This is well known that Editing code during SAP GUI debugging is not possible. Source Code view also provides possibility to create additional breakpoint(s) and/or Delete session Breakpoint(s) during runtime.
- Variable View: This is also one of the most important views where runtime variables can be checked for values they hold. This view, just like its SAP GUI debugger counterpart, variables can be edited at runtime. Variables can be checked in two ways here:
- By double-clicking the variable in Source Code view.
- By entering variable/internal table/object manually by replacing with a variable to be checked.
- Breakpoint View: Breakpoint view allows to Create, Remove, and Skip breakpoints. There are two types of Breakpoint addition possible:
- Add Statement Breakpoint
- Add Exception Breakpoint
- Outline View: This View works very similar to Outline view present in ABAP perspective’s Outline view. It provides major artifact link for direct navigation and tracking.
- Console, Tasks, and ABAP Internal Table(Debugger) Views: Console View has the ability to provide logs and Task View provides an overview of a task with its short description, resource, path, and location. ABAP Internal Table(Debugger) View provides a dedicated view for display of runtime internal table content. If an Internal table is double-clicked in Variable view, the content is displayed in this view.
Introduction of Debug Runtime Controls:
Most of the runtime controls are available on Eclipse Toolbar in Debugger perspective as below. They are different in look and feel w.r.t classical SAP GUI corresponding features.
Introduction to New terms:
Terminate Debugging: This terminates debugging session and further execution doesn’t happen. The output is not produced.
Disconnect Debugging: This disconnects debugging session and further execution continues. The output is produced normally in this case.
Skip all breakpoints: This effectively skips all set breakpoints in the current user session. The Debug sign present in left bar is stricken out on activating this control which indicates that breakpoint will be skipped.
Once this control is activated, breakpoints are not triggered even upon next execution. A developer needs to separately goto Debug perspective and disable this control to reactivate debugging.