stepout
Exit current function during debugging to return to the calling function, allowing you to analyze program flow and identify issues in Go code execution.
Instructions
Step out of current function
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ID of the debug session |
Implementation Reference
- src/handlers/control.ts:82-90 (handler)The core handler logic for the 'stepout' tool. It sends a Delve 'stepout' command to the debug session and returns a textual confirmation message.case "stepout": { await sendDelveCommand(session, "Command", { name: "stepout" }); return { content: [{ type: "text", text: "Stepped out of function" }] }; }
- src/server.ts:223-235 (registration)Registration of the 'stepout' tool in the MCP server's listTools response, defining its name, description, and input schema (requires sessionId).{ name: "stepout", description: "Step out of current function", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the debug session" } }, required: ["sessionId"] }
- src/server.ts:410-413 (registration)Dispatch logic in the callTool handler that routes 'stepout' (and other control commands) to the handleControlCommands function.// Control commands if (["setBreakpoint", "removeBreakpoint", "continue", "next", "step", "stepout", "variables", "evaluate"].includes(name)) { return handleControlCommands(name, args); }
- src/server.ts:226-235 (schema)Input schema for the 'stepout' tool, specifying that a sessionId is required.inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the debug session" } }, required: ["sessionId"] }