Skip to main content

ABAP Debugger

ABAP Debugger Capability

Adri AI agents can use the SAP debugger workflow, including:

  • setting breakpoints
  • launching a debug run in the selected SAP system
  • stepping through execution (step over/step into/continue)
  • collecting runtime findings from actual execution paths

This is very useful for hard-to-trace behavior, exits, and BAdI resolution. Adri AI now supports the full debugger capability set for day-to-day ABAP debugging workflows.

Pre-requisites

  1. Complete MCP setup in Claude Code: Setup (Claude Code)
  2. Make sure your target SAP system is connected.

In these screenshots, the red box shows user action and the blue box shows important information to note.

Step-by-step (Claude Code example)

  1. In Claude Code, type /adri and select /adri-ai:sap_debugger_guide (MCP).

Select the sap_debugger_guide prompt

  1. Confirm the debugger guide is loaded. It asks for the SAP session/program context and where to place breakpoints.

Debugger guide loaded with required inputs

  1. Ask your debug objective and include where you want the breakpoint.

Submit debugger objective and breakpoint target

  1. When prompted, allow debugger launch (recommended: allow for all projects).

Approve debugger launch tool permission

  1. Review runtime results captured by the agent from debugger execution.

Captured debugger findings and runtime analysis

Full Debugger Capability Matrix

All debugger capabilities are now available and working. There are no known debugger limitations at this time.

Launch and lifecycle

CapabilityWhat it doesUsageStatus
debugger_launchOne-step bootstrap: sync breakpoints -> listen -> execute -> attach -> inspectdebugger_launch(session_handle, class_name, breakpoints=[{uri, line, condition?}])Working
debugger.listenWait for debuggee sessionsinvoke_adt(method="debugger.listen", params={session_id, terminal_id, ide_id, poll_timeout_ms?})Working
debugger.attachAttach to paused debuggee sessioninvoke_adt(method="debugger.attach", params={session_id, debuggee_id})Working
debugger.terminateTerminate or detach debuggee sessioninvoke_adt(method="debugger.terminate", params={debuggee_session_id?, terminate_debuggee: true/false})Working

Execution control

CapabilityWhat it doesUsageStatus
debugger.step_overStep over current statement (F6)invoke_adt(method="debugger.step_over", params={debuggee_session_id})Working
debugger.step_intoStep into current statement (F5)invoke_adt(method="debugger.step_into", params={debuggee_session_id})Working
debugger.step_returnStep out of current method (F7)invoke_adt(method="debugger.step_return", params={debuggee_session_id})Working
debugger.continueContinue until next breakpoint (F8)invoke_adt(method="debugger.continue", params={debuggee_session_id})Working
debugger.run_to_lineRun to a specific lineinvoke_adt(method="debugger.run_to_line", params={debuggee_session_id, source_uri, line})Working
debugger.jump_to_lineJump execution pointer to a specific lineinvoke_adt(method="debugger.jump_to_line", params={debuggee_session_id, source_uri, line})Working

Variable inspection

CapabilityWhat it doesUsageStatus
debugger.get_variablesGet variables at current stop point (@ROOT, @LOCALS, @PARAMETERS, @GLOBALS, @SYSTEM)invoke_adt(method="debugger.get_variables", params={debuggee_session_id})Working
debugger.get_variables_by_idsFetch specific variables by reference IDsinvoke_adt(method="debugger.get_variables_by_ids", params={debuggee_session_id?, variable_ids: ["ME", "@SYSTEM"]})Working
debugger.add_watch_variableAdd watch expression (for example SY-SUBRC, structure fields)invoke_adt(method="debugger.add_watch_variable", params={debuggee_session_id, expression: "SY-SUBRC"})Working
debugger.get_variable_valueGet full value of a specific variableinvoke_adt(method="debugger.get_variable_value", params={debuggee_session_id?, variable_id, max_length?, hex_format?})Working
debugger.set_variable_valueModify variable value at runtimeinvoke_adt(method="debugger.set_variable_value", params={debuggee_session_id?, variable_id, new_value})Working
debugger.evaluate_expressionEvaluate expression in debug contextinvoke_adt(method="debugger.evaluate_expression", params={debuggee_session_id?, expression, max_string_length?, max_nesting_level?})Working
debugger.get_call_stackGet call stack and framesinvoke_adt(method="debugger.get_call_stack", params={debuggee_session_id})Working

Breakpoint management

CapabilityWhat it doesUsageStatus
debugger.sync_breakpointsSync line breakpoints (full/partial mode)invoke_adt(method="debugger.sync_breakpoints", params={session_id, breakpoints: [{source_uri, line, enabled, client_id?}], mode?: "full"})Working
debugger.sync_statement_breakpointsSync statement breakpoints (GET BADI, CALL BADI, COMMIT WORK, etc.)invoke_adt(method="debugger.sync_statement_breakpoints", params={session_id, statements: ["GET BADI", "CALL BADI"]})Working
debugger.sync_exception_breakpointsSync exception breakpoints by classinvoke_adt(method="debugger.sync_exception_breakpoints", params={session_id, exception_classes: ["CX_SY_ZERODIVIDE"]})Working
debugger.set_breakpointSet one line breakpoint during active sessioninvoke_adt(method="debugger.set_breakpoint", params={session_id, source_uri, line})Working
debugger.remove_breakpointRemove breakpoint by server IDinvoke_adt(method="debugger.remove_breakpoint", params={session_id, server_id})Working
debugger.validate_conditionValidate breakpoint condition expressioninvoke_adt(method="debugger.validate_condition", params={session_id, condition})Working

Watchpoints

CapabilityWhat it doesUsageStatus
debugger.create_watchpointCreate watchpoint and break on variable changeinvoke_adt(method="debugger.create_watchpoint", params={debuggee_session_id?, variable_name, condition?})Working
debugger.delete_watchpointDelete a watchpointinvoke_adt(method="debugger.delete_watchpoint", params={debuggee_session_id?, watchpoint_uri})Working

Multi-session support

  • Multiple debugger sessions can run concurrently on the same SAP connection.
  • Use debuggee_session_id for all post-attach calls so each action targets the correct session.
  • Existing calls without debuggee_session_id continue to work through backward-compatible fallback behavior.

Summary

  • 26 debugger RPC methods are fully wired and working.
  • Plus 1 composite debugger tool and 1 debugger guide prompt are available.
  • No known debugger limitations at this time.