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.
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.
- Why you need it
- Requirements
- Installation
- Quick start
- Window layout
- Toolbar reference
- Variable trees
- Tables, strings and popups
- Watchpoints
- Time machine: backward debugging
- Diagrams (Mermaid)
- Coverage
- AI assistant (optional)
- Performance tips
- Repository layout
- For developers
- Links and credits
- License
| 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 |
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.
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.
- 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.
| 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.
Buttons that carry a state show the current state in their label (pressing History On turns
recording off and the label becomes History OFF).
| 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 |
| 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 |
| 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 |
| 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 |
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 |
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.
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.
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.
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 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.
So you get code coverage across all stack levels, from a normal debugging session.
The AI button opens a panel where an LLM analyses the current step, the stack, the variables and the
change history and proposes the most likely cause of the bug. It can set its own guard break-point and
drive the debugger, and every call and action is written to a log (AI Log).
- Requires the separate ABAP-AI-Code project, which supplies the LLM client and the tool factory, and writes the provider/model/API-key configuration that Smart Debugger reads at start-up.
- Without that configuration the
AIbutton is not displayed at all. - The tool contract used by the agent is documented in
TOOLS/set_breakpoint.md. - The generated standalone file contains no AI support.
This part is the youngest and least finished piece of the project.
Recording everything on every step costs time. When a run feels slow:
- Lower
Depth—Depth 0…Depth 2is usually enough,Depth 9records nine stack levels below you. - Keep
Only Z—Z & Standardrecords standard SAP code as well and multiplies the volume. - Stay on
Alpha— switch toBetaonly when you suspect a change was missed. - Switch
Vars History OFFwhen you only need the call flow, not the values. - Use
Visualizationdeliberately: it is a light per-step source refresh, useful to watch execution, but it still costs a frontend round trip per step.
src/
z_smart_debugger.prog.abap thin debugger script (entry point)
z_smart_debugger_standalone.prog.abap generated single-file build - do not edit
zcl_smd_debugger_base.clas.abap step engine, history, watchpoints
zcl_smd_window.clas.abap main window, toolbar, source viewer
zcl_smd_rtti_tree.clas.abap variable trees (RTTI based)
zcl_smd_table_viewer.clas.abap table popups + select-options
zcl_smd_sel_opt.clas.abap select-options control
zcl_smd_source_parser.clas.abap statement/keyword scanner
zcl_smd_code_scheme.clas.abap control-structure scheme (Calculations Flow)
zcl_smd_mermaid.clas.abap diagram windows
zcl_smd_ai_agent.clas.abap AI agent (modular install only)
zcl_smd_*.clas.abap text viewer, popups, RTTI, HTML, helpers
TOOLS/ AI tool contracts
docs/ code review and analysis documents
generate_standalone.sh / .bat standalone build
DEVELOPMENT.md— architecture invariants, coding conventions, common patternsSTANDALONE.md— how the single-file build is generateddocs/CODE_REVIEW_2026-07-15.md— full audit with verification scenarios
Edit the ZCL_SMD_* classes only; z_smart_debugger_standalone.prog.abap is regenerated from them.
Written by Yurii Sychov — blog · LinkedIn · ysichov@gmail.com
- RU description: https://ysychov.wordpress.com/2020/07/27/abap-simple-debugger-data-explorer/
- Predecessor project SDDE: https://github.com/ysichov/SDDE (wiki)
External resources and inspiration:
- abapMermaid / scroll-enabled fork
- Data object visualizer by AtomKrieg
- ABAP-Object-Visualizer by larshp
- Simple Data Explorer
- https://habr.com/ru/articles/504908/
Example used in the screenshots — iterator pattern: http://zevolving.com/2012/01/iterator-design-pattern-to-access-linked-list/