set_debugger_breakpoint
Set a breakpoint at a specific ABAP source line in the SAP debugger. Provide the object URI, line number, and optionally user and system ID to halt execution for inspection.
Instructions
Set a breakpoint at a specific source location in the debugger
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | Object source URI (e.g. /sap/bc/adt/programs/programs/ztest/source/main) | |
| line | Yes | Line number for breakpoint | |
| user | No | SAP username (default: current user) | |
| system_id | No | SAP system ID (e.g. DEV). Omit to use default system. |
Implementation Reference
- src/mcp-server.ts:1215-1219 (handler)The handler for the set_debugger_breakpoint MCP tool. Parses input via DebuggerBreakpointSchema, then calls client.debuggerSetBreakpoints(uri, line, user).
case "set_debugger_breakpoint": { const { uri, line, user } = DebuggerBreakpointSchema.parse(args); const result = await client.debuggerSetBreakpoints(uri, line, user); return { content: [{ type: "text", text: result }] }; } - src/mcp-server.ts:687-700 (registration)Registration of the 'set_debugger_breakpoint' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema with uri, line, and optional user parameters.
{ name: "set_debugger_breakpoint", description: "Set a breakpoint at a specific source location in the debugger", inputSchema: { type: "object" as const, properties: { uri: { type: "string", description: "Object source URI (e.g. /sap/bc/adt/programs/programs/ztest/source/main)" }, line: { type: "number", description: "Line number for breakpoint" }, user: { type: "string", description: "SAP username (default: current user)" }, ...SYSTEM_ID_PROP, }, required: ["uri", "line"], }, }, - src/mcp-server.ts:135-139 (schema)Zod schema 'DebuggerBreakpointSchema' used to validate the input arguments (uri, line, user) for the set_debugger_breakpoint tool.
const DebuggerBreakpointSchema = z.object({ uri: z.string(), line: z.number(), user: z.string().optional(), }); - src/adt-client.ts:484-499 (handler)The actual implementation method 'debuggerSetBreakpoints' in AdtClient. Ensures an active debug session exists, then POSTs an XML breakpoint definition to the SAP ADT debugger breakpoints endpoint.
async debuggerSetBreakpoints(uri: string, line: number, user?: string): Promise<string> { this.ensureDebugSession(); const u = (user ?? this.config.username).toUpperCase(); const xml = `<?xml version="1.0" encoding="UTF-8"?> <dbg:breakpoints xmlns:dbg="http://www.sap.com/adt/debugger"> <dbg:breakpoint dbg:kind="line" dbg:uri="${this.escapeXml(uri)}" dbg:line="${line}" dbg:user="${this.escapeXml(u)}"/> </dbg:breakpoints>`; const resp = await this.http.post("/sap/bc/adt/debugger/breakpoints", xml, { headers: this.statefulHeaders({ "Content-Type": "application/xml", Accept: "application/xml", }), responseType: "text", }); return resp.data as string; }