Evaluate ABAP Debug Expression
sap_debug_evalRead an ABAP variable at the current debug stop point to get its value without listing all locals.
Instructions
Read one variable at the current stop point, without listing all locals.
Note: the ABAP debugger resolves variable IDs, not computed expressions. 'LV_AMOUNT', 'SY-SUBRC' and 'GT_RESULT' work; 'strlen( lv_text )' does not — there is no evaluate-expression service in this API.
Args:
session_id (string).
expression (string): variable name.
response_format.
Returns (json): { sessionId, expression, value, type? }. Error Handling:
Not in scope at the current stop point -> use sap_debug_variables to see what is visible here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | ABAP variable name to read (e.g. 'SY-SUBRC', 'LV_AMOUNT', 'GT_RESULT'). | |
| session_id | Yes | Session ID from sap_debug_attach. | |
| response_format | No | Output format: 'markdown' (human-readable, default) or 'json' (structured). | markdown |