List ABAP Debug Variables
sap_debug_variablesRead ABAP variable values at the current debugger stop point using a session ID and optional variable names. Returns types, values, and truncation info for locals, structures, tables, and references.
Instructions
Read ABAP variable values at the current stop point.
Requires state='STOPPED' (a debuggee attached by sap_debug_wait).
Args:
session_id (string).
names (string[]): specific variables; omit for all locals (the '@ROOT' hierarchy).
response_format.
Returns (json): { sessionId, count, variables: [{name, id?, type?, value?, kind?, tableLines?}] }. kind: 'elementary' | 'structure' | 'table' | 'reference'. Values SAP truncated are marked as truncated; tables report tableLines.
Error Handling:
'No debuggee attached' -> the session is not STOPPED; run the code and call sap_debug_wait first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Variable names/ids to read (e.g. 'LV_AMOUNT', 'SY-SUBRC'). Omit for all locals at the current stop point. | |
| session_id | Yes | Session ID from sap_debug_attach. | |
| response_format | No | Output format: 'markdown' (human-readable, default) or 'json' (structured). | markdown |