step
Advance the debugger into the next function call within a Go debug session to inspect internal execution and variable state.
Instructions
Step into function call
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ID of the debug session |
Implementation Reference
- src/handlers/control.ts:72-79 (handler)The 'step' case in handleControlCommands function - sends a 'step' command to Delve API and returns confirmation text 'Stepped into function'
case "step": { await sendDelveCommand(session, "Command", { name: "step" }); return { content: [{ type: "text", text: "Stepped into function" }] }; - src/server.ts:209-221 (schema)Input schema registration for the 'step' tool - defines name, description ('Step into function call'), and input schema (requires sessionId)
{ name: "step", description: "Step into function call", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the debug session" } }, required: ["sessionId"] } - src/server.ts:411-413 (registration)Tool dispatch routing - 'step' is listed in the control commands array that routes to handleControlCommands(name, args)
if (["setBreakpoint", "removeBreakpoint", "continue", "next", "step", "stepout", "variables", "evaluate"].includes(name)) { return handleControlCommands(name, args); } - src/session.ts:69-72 (helper)sendDelveCommand helper - sends API commands to a running Delve session via curl, used by the step handler to send the 'step' command
export async function sendDelveCommand(session: DebugSession, command: string, args: any = {}): Promise<any> { const { stdout } = await exec(`curl -s -X POST http://localhost:${session.port}/api/v2/${command} -d '${JSON.stringify(args)}'`); return JSON.parse(stdout); }