Skip to main content
Glama
qckfx
by qckfx

step_debug

Step through Node.js code execution line-by-line to identify and resolve issues. Perform actions like next, step, continue, and out to control debugging flow and analyze runtime behavior.

Instructions

Step through code execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesDebug action to perform

Implementation Reference

  • The main handler function for the 'step_debug' tool. It checks if a debug session is active, then uses the Chrome DevTools Protocol (CDP) Debugger domain to perform stepping actions (stepOver, stepInto, resume, stepOut) based on the input action.
    private async stepDebug(args: { action: "next" | "step" | "continue" | "out" }) { if (!this.debugSession.connected || !this.debugSession.client) { return { content: [ { type: "text", text: "No active debug session. Please attach debugger first.", }, ], isError: true, }; } try { const { Debugger } = this.debugSession.client; // Use CDP to perform the step action switch (args.action) { case "next": await Debugger.stepOver(); break; case "step": await Debugger.stepInto(); break; case "continue": await Debugger.resume(); break; case "out": await Debugger.stepOut(); break; } return { content: [ { type: "text", text: `Performed debug action: ${args.action}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error performing debug action: ${error}`, }, ], isError: true, }; }
  • Input schema definition for the 'step_debug' tool, specifying the 'action' parameter with allowed values.
    inputSchema: { type: "object", properties: { action: { type: "string", enum: ["next", "step", "continue", "out"], description: "Debug action to perform" } }, required: ["action"], },
  • src/index.ts:203-217 (registration)
    Registration of the 'step_debug' tool in the ListToolsRequestSchema handler, including name, description, and schema.
    { name: "step_debug", description: "Step through code execution", inputSchema: { type: "object", properties: { action: { type: "string", enum: ["next", "step", "continue", "out"], description: "Debug action to perform" } }, required: ["action"], }, },
  • src/index.ts:259-260 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes 'step_debug' calls to the stepDebug method.
    case "step_debug": return await this.stepDebug(args as { action: "next" | "step" | "continue" | "out" });

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/qckfx/node-debugger-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server