Debugging in SAP ABAP Eclipse (ADT) Debugging in SAP ABAP Development Tools (ADT) for Eclipse is a powerful way to analyze and troubleshoot ABAP programs. It provides modern debugging features similar to SAP GUI but with better usability.
1️⃣ Types of Debugging in Eclipse (ADT)
- Classic Debugging – Similar to SAP GUI debugger.
- Debugging with External Breakpoints – Useful for Web Dynpro, RFC, and HTTP calls.
- Debugging Background Jobs – Attaching the debugger to running jobs.
- Memory Analysis and Variable Inspection – Inspect deep structures, internal tables, and objects.
2️⃣ Steps to Debug in Eclipse
1. Set Breakpoints
- Open your ABAP object (report, class, function module, etc.).
- Navigate to the line of code where you want to pause execution.
- Set a breakpoint:
- Click on the left margin of the editor.
- Or use the shortcut:
Ctrl + Shift + B
.
2. Run the Program in Debug Mode
- Right-click the program → Select Debug As → ABAP Application.
- Or, press
F9
to start debugging.
3. Control Execution
- Step Over (
F6
) → Execute the current line and move to the next. - Step Into (
F5
) → Dive into function modules or methods. - Step Out (
F7
) → Exit the current function/module. - Resume (
F8
) → Continue execution until the next breakpoint. - Terminate (
Shift + F2
) → Stop debugging.
4. Inspect Variables and Objects
- Hover over a variable to see its current value.
- Use the Variables tab to inspect and modify values during debugging.
- Open the Memory Analysis view for deep object inspection.
5. Debugging External Sessions (RFC, HTTP, etc.)
- Set an External Breakpoint (
Ctrl + Shift + B
on a relevant line). - Execute the RFC/web request from an external system.
- The debugger will automatically stop at the breakpoint.
3️⃣ Additional Debugging Features
🔹 Change Variable Values – Modify variables at runtime from the Variables tab.
🔹 Watchpoints – Monitor specific variables for changes (Right-click → Add Watchpoint
).
🔹 Conditional Breakpoints – Stop execution only when a condition is met (Right-click Breakpoint → Add Condition
).
🔹 Debug Background Jobs – Use SAP transaction SM37
, find your job, and choose “Debug”.
🔹 Debug User Sessions – Use SM50
to attach to a running process.
4️⃣ Debugging Shortcuts in Eclipse (ADT)
Action | Shortcut |
---|---|
Toggle Breakpoint | Ctrl + Shift + B |
Step Into | F5 |
Step Over | F6 |
Step Out | F7 |
Resume Execution | F8 |
Terminate Debugger | Shift + F2 |
Run Debug As | Ctrl + F11 |
🚀 Pro Tip:
- Combine debugging with ATC checks and ABAP cleaner for high-quality code.
- Use Session Breakpoints (
Ctrl + Shift + B
) for debugging workflows, batch jobs, and RFCs.