Smart Debugger
A debugger script for the SAP GUI New Debugger that records every step and variable change of an ABAP program, so execution can be stepped backwards with F5 and F8.
The standard ABAP debugger shows one variable at a time, at the current step. Smart Debugger runs from the Script tab of the New Debugger and opens its own workspace: locals, globals, parameters and object instances in trees, any number of internal tables in their own ALV windows, and a recorded history of steps and value changes, so F5 steps back and F8 runs back to the previous stop condition. It also marks executed lines as coverage and, with abapMermaid installed, draws the calls made so far. Nothing has to be installed: a generated single file of about 9,000 lines is pasted into the Script tab, and the abapGitabapGitA Git client written in ABAP that runs inside the system, so objects are cloned, pulled and pushed without leaving it; with no package manager in ABAP, a cloned repository is how code is distributed.community org, abap install adds the classes and an AI panel. It runs in SAP GUI only, not in ADT, on ABAP 7.40 and later.
Facts
Where it sits
Who is behind it
In the atlas: maintains 9, contributes to 10@ysichovmaintainerChristian GünterContributes to this
In the atlas: maintains 1, contributes to 12@christianguenter2Lars HvamContributes to this
In the atlas: maintains 13, contributes to 92, wrote 1@larshpAlice V.Contributes to this
In the atlas: maintains 6, contributes to 12@oiseeDaniel WegnerContributes to this
In the atlas: maintains 3, contributes to 10@WegnerDan4 contributors
What it declares
Every artifact
- Type
- App
- Origin
- Independently maintained
As an app
- Where it runs
- Inside the system it serves
- Distributed through
- abapGitCopied into the project
Connections
Seeing what running code did between input and result
Agentic coding assistant in ABAP that runs as an SAP GUI report
SAP GUI tool for static analysis of ABAP call flow and code metrics
Download
README
quoted from ysichov/Smart-Debugger under MIT, readSmart 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
- 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
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.
So you get code coverage across all stack levels, from a normal debugging session.
AI assistant (optional)
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.
Performance tips
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.
Repository layout
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
For developers
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.
Links and credits
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/
License
Others providing
Compare all 8 on the Debugging page →- dbg_value_statementdbg_value_statementAn ABAP Debugger script that turns a variable's structure or table into the VALUE statement that recreates it, with a tree explorer, also callable as a function module from a report.independent, abapDebugger script generating a VALUE statement for a variable
- dump_infodump_infoDisplays the variables an ABAP short dump captured, for dumps selected on a selection screen; its documentation does not state which dumps it reads, which releases it runs on or how it installs.independent, abapDisplays the variables of ABAP short dumps
- abapsmithabapsmithAn MCP server that lets an LLM develop in ABAP on a live system over ADT, with writes off by default and every mutation recorded in a local journal that can undo it.independent, abapABAP MCP server over ADT with a local journal that can undo writes
- ABAP-Object-VisualizerABAP-Object-VisualizerA debugger script that writes an object hierarchy to the clipboard at a breakpoint as a Graphviz description, for pasting into a renderer such as webgraphviz.com.independent, abapDebugger script exporting an object hierarchy as Graphviz
- abap_debugger_object_graph_extensionabap_debugger_object_graph_extensionAn ABAP debugger extension that shows the object on the debugger's Objects tab as a Graphviz graph in a browser window, built on ABAP Graph and Graphviz-browser and tested on NetWeaver 7.5.independent, abapABAP debugger extension drawing objects as a Graphviz graph
- Graphviz-browserGraphviz-browserA static page that draws a Graphviz graph in a browser, written for the ABAP debugger object graph extension and deployable as BSP pages in the system the debugger runs in.independent, abapStatic page drawing Graphviz graphs for the ABAP debugger extension
- ABAP remote filesystemABAP remote filesystemA Visual Studio Code extension that opens an ABAP system over ADT as an editable filesystem and exposes system tools to GitHub Copilot and external MCP clients.independent, abapVS Code extension editing ABAP systems over ADT as a filesystem
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
abaplint
Flavors
“| **Release** | ABAP 7.40+ (inline declarations, `VALUE`/`COND`, string templates). The generated standalone file is additionally patched for 7.50 |” — ysichov/Smart-Debugger — README
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:ysichov-smart-debugger- JSON
- /artifacts/ysichov-smart-debugger.json
- MCP
- Connecting an agent