Smart Debugger
Project ARIADNA — Advanced Reverse Engineering ABAP Debugger with New Analytics
Version: beta 0.9.600 · SAP GUI debugger script · no modification of the inspected code
Smart Debugger is a debugger script for the SAP GUI New Debugger. It opens its own multi-window
workspace that shows all variables, structures, internal tables and object instances of the current
program at once — and, while you run, it records every step and every variable change, so you can also
step backwards through the execution you already passed.
Why you need it
The standard ABAP debugger shows you one variable at a time, in the present moment only. Smart Debugger
gives you the whole picture and the whole timeline.
| Everyday pain in the standard debugger | What Smart Debugger does |
|---|
| You add variables to the watch list one by one | All locals, globals, parameters, SY, CLASS-DATA and LDB variables are already there, in hierarchical trees |
| Deep structures and object instances take endless clicking | Full tree drill-down, objects split into public / private / protected attributes |
| Only one internal table on screen at a time | Double-click any table → its own ALV window. No limit — open ten tables side by side |
| You stepped one line too far → restart the whole transaction | Step back. History of every step and every value change is recorded |
| "Where did this value come from?" | Double-click a variable = watchpoint; jump to the previous/next stop condition, forward or backward |
| Screen full of empty and irrelevant variables | Initials hides empty values; Locals / Globals / SYST / CLASS-DATA / LDB toggle whole groups |
| No idea of the call flow you just executed | Mermaid call-flow diagram, live calls graph, control-structure scheme of the include |
| "Which branches actually ran?" | Coverage highlights every executed line, on every stack level |
| Installing tooling into a customer system | Nothing to install: paste one script into the debugger. abapGit install is optional |
Bottom line: fewer debug restarts, fewer "let me run it again with another breakpoint" cycles.
Time is money.
Table of contents
Requirements
| |
|---|
| SAP GUI | Required. Smart Debugger is built on CL_GUI_* controls and runs inside the New Debugger, not in ADT/Eclipse |
| Release | ABAP 7.40+ (inline declarations, VALUE/COND, string templates). The generated standalone file is additionally patched for 7.50 |
| Authorization | Standard debugging authorization (S_DEVELOP with activity DEBUG) |
| abapMermaid | Optional. Needed only for the diagram buttons. Use the scroll-enabled fork: ysichov/abapMermaid (original: WegnerDan/abapMermaid). Without it the Diagram / Live Debug buttons are simply not shown |
Installation
Option A — copy & paste (nothing to install)
Take src/z_smart_debugger_standalone.prog.abap —
one self-contained file (~9 000 lines) with every class merged in — and paste it into the debugger
Script tab. Nothing is created in the system, nothing is transported.
The AI panel is not part of the standalone build (it depends on a separate repository).
Everything else is identical to the modular version.
Option B — abapGit (modular classes)
Clone this repository with abapGit into any package. You get the
ZCL_SMD_* classes plus two programs:
| Object | Purpose |
|---|
Z_SMART_DEBUGGER | The thin debugger script that instantiates the classes — paste this one in the Script tab |
Z_SMART_DEBUGGER_STANDALONE | The merged single-file variant (generated, do not edit) |
Use this option if you want the AI panel, or if several developers should share one installed version.
Quick start
- Set break-points anywhere in the ABAP code you want to inspect and start the transaction/report.
- When a break-point triggers, switch to the last tab of the New Debugger —
Script.
- Paste the program source (see Installation), or press Load script if you saved
it before. Tip: paste once, press Save script, and afterwards just load it by name.
- Select the radio button Execute directly and press Start Script.
Window layout
| Area | Content |
|---|
| Top | Toolbar (see below) |
| Center | Source code viewer of the current include. Click the left border of a line to set/delete a session break-point, Ctrl + click for an external one |
| Right, upper | Variables — locals, globals, SY, class data, LDB |
| Right, lower left | Importing parameters |
| Right, lower right | Exporting & Returning parameters |
| Bottom | Call stack / execution history ALV |
| Left | AI panel — hidden until the AI button is pressed |
Importing and exporting/returning parameters live in their own panels on purpose: when you debug a
method or function module, that is exactly the split you care about.
Toolbar reference
Buttons that carry a state show the current state in their label (pressing History On turns
recording off and the label becomes History OFF).
Run control
| Button | Meaning |
|---|
Step into (F5) | One step ahead |
Step over (F6) | One operation ahead |
Step out (F7) | Leave the current stack level |
Continue (F8) | To the next break-point or watchpoint |
Forward / Backward | Direction switch. In Backward mode F6/F7 disappear, F5 becomes Step back and F8 becomes to the previous stop condition |
Recording
| Button | Meaning | Default |
|---|
History On/OFF | Record the step/stack history | On |
Vars History On/OFF | Record every variable change | On |
Depth N | How many stack levels below the current one are recorded, 0…9. Depth 0 = current level only; Depth 1 = current level plus the forms/methods/functions it calls; and so on. Click cycles the value | 9 |
Only Z / Z & Standard | Record Z code only, or standard SAP code as well | Only Z |
Alpha / Beta | Analysis engine. Alpha parses the executed statement and refreshes variables only after value-changing operations — much faster, may skip exotic changes. Beta re-reads everything on every step — slower, more precise | Alpha |
Analysis
| Button | Meaning |
|---|
Diagram | Mermaid diagram of all calls performed so far (needs abapMermaid) |
Live Debug | Separate window with its own F5/F6/F7/F8 and a calls graph that redraws as you run (needs abapMermaid) |
Calculations Flow | Mermaid scheme of the control structure of the current include: IF/ELSEIF/ELSE, CASE/WHEN, LOOP/DO/WHILE, TRY/CATCH, with plain statements collapsed into "N operations" nodes |
Coverage | Paint every executed line of the current include; double-click a stack row to switch include |
Steps | Open the recorded step table as an ALV |
History | Open the recorded variable-change history as an ALV |
Display and utilities
| Button | Meaning |
|---|
Visualization OFF/ON | When ON, the source view follows execution line by line during long runs (light refresh only — variables and trees are not rebuilt on every step) |
Clear vars | Remove all selected variables / watchpoints |
AI, AI Log | See AI assistant. Hidden when no AI configuration is present |
Debug | Activate the internal BREAK-POINTs of the debugger script itself — for developing Smart Debugger, not for debugging your program |
Info (globe icon) | Opens the documentation links in a browser |
Variable trees
Every variable is a tree node: structures, deep structures and object instances can be expanded down
to the leaf. Object attributes are grouped and colour-coded — 🟢 public, 🔴 private, 🟡 protected.
Tables with header lines and tables declared with OCCURS appear as variable_name[] next to their
header structure variable.
Functions available in the Variables tree toolbar:
| Function | Meaning |
|---|
Initials | Show/hide variables with initial (empty) values — on/off switch |
Locals | Show/hide local variables |
Globals | Show/hide global variables |
SYST | Show/hide the SY structure (sy-datum, sy-uname, …) |
CLASS-DATA | Show/hide static (global) attributes of the active classes |
LDB | Show/hide Logical Database globals — hidden by default, because in the standard debugger this noise cannot be switched off |
| Refresh | Re-read the current step and rebuild the trees |
Tables, strings and popups
Double-click on a variable:
- an internal table opens in its own ALV window — as many windows as you like, side by side;
- a string opens in a text viewer window.
Each table window offers:
| Function | Meaning |
|---|
| Select-Options panel | Filter the table with real select-options, per column |
Tech names | Toggle technical field names / descriptions |
| Language buttons | Re-translate column headers into another logon language |
Show empty columns | Show or hide columns that contain no data |
| Standard ALV functions | Toggle the standard ALV toolbar (sort, filter, layout, export) |
Open table windows follow navigation: when you step forward or backward, they refresh themselves
with the table content of the step you are standing on.
Watchpoints
Creating a watchpoint is a double-click on the variable — it is highlighted and added to the
selected-variables table. Double-click again removes it. Clear vars removes all of them.
Watchpoints are what Continue (F8) and to the previous stop condition stop at — in both directions.
A selected variable also drags in its dependants: values written into it by called forms, methods and
functions are tracked as well.
Time machine: backward debugging
With History On and Vars History On (both default) Smart Debugger stores every step and every
variable change while the program runs. Switch the direction button to Backward and walk into the
past: Step back for one step, to the previous stop condition for the previous break-point or
watchpoint. Switch back to Forward and continue as usual.
The recorded data is what feeds the Steps and History tables, the Coverage view and the diagrams.
Internally, table snapshots are stored as deltas with a full snapshot every 20 changes, so a long
run with large internal tables stays affordable in memory. What is recorded is controlled by
Depth N and Only Z / Z & Standard.
Diagrams (Mermaid)
All three diagram views need abapMermaid (scroll-enabled fork).
If the class is not installed, the diagram buttons are hidden.
| View | What it draws |
|---|
Diagram | Calls flow — every call performed during the recorded execution |
Live Debug | Live calls graph — same graph, but in its own window with its own step buttons, redrawn whenever the current frame changes |
Calculations Flow | Control-structure scheme of the include on display, built from the ABAP scanner: branches, loops and TRY blocks in their real nesting |
Coverage
Coverage paints every line of the current include that was actually executed. The bottom ALV switches
to the list of includes that were touched — double-click a row to see the coverage of that include.