Set ABAP Debugger Breakpoint
sap_set_breakpointPause ABAP code execution at a chosen line by setting an external breakpoint, with an optional condition to trigger only when true.
Instructions
Set an external (ADT) breakpoint at a line in an ABAP object, for the user the debug session listens for (default SAP_USER).
Args:
object_type, object_name, line (required).
condition (optional): ABAP expression; break only when true. Best-effort — the condition attribute is not verified on this system.
function_group: required for object_type='function'.
response_format.
Returns (json): { success, breakpoints: [{id, clientId, uri, line, objectName, condition}], failed, message }. SAP resolves the source line to the line of the generated include, so the id may name a different LINE_NR than you asked for. That is normal.
Examples:
"Break on ZTEST line 42" -> object_type='program', object_name='ZTEST', line=42.
"Break on ZCL_FOO line 15 when SY-SUBRC <> 0" -> add condition="SY-SUBRC <> 0". Notes:
Works standalone: external breakpoints persist in SAP (table ABDBG_EXTDBPS) whether or not a debug session exists. They only TRAP execution while a listener is armed — call sap_debug_attach, then sap_debug_wait.
The ADT write is a FULL-SET SYNC: every call re-sends this server's whole breakpoint registry as the complete set for its identity. A consequence worth knowing: the first sap_set_breakpoint after a server restart drops breakpoints an earlier run left behind.
The breakpoint is keyed to the debug session's user. To trap another user's execution, pass that user to sap_debug_attach BEFORE setting breakpoints.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line number to break on. | |
| condition | No | Optional ABAP condition expression (e.g. "SY-TABIX = 5"). Break only when true. | |
| object_name | Yes | Object name (e.g. 'ZPROG', 'ZCL_FOO'). | |
| object_type | Yes | Object kind: 'program', 'include', 'class', 'interface', or 'function'. | |
| function_group | No | Required when object_type='function'. | |
| response_format | No | Output format: 'markdown' (human-readable, default) or 'json' (structured). | markdown |