step_out
Exits the current function during NodeJS debugging, allowing users to continue execution and inspect variables at the caller level.
Instructions
Steps out of current function
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.js:701-733 (handler)The main handler function for the 'step_out' tool. It ensures the debugger is enabled and paused, then sends the 'Debugger.stepOut' command to step out of the current function, returning appropriate success or error messages.async () => { try { // Ensure debugger is enabled if (!inspector.debuggerEnabled) { await inspector.enableDebugger(); } if (!inspector.paused) { return { content: [{ type: "text", text: "Debugger is not paused at a breakpoint" }] }; } await inspector.send('Debugger.stepOut', {}); return { content: [{ type: "text", text: "Stepped out of current function" }] }; } catch (err) { return { content: [{ type: "text", text: `Error stepping out: ${err.message}` }] }; } }
- src/mcp-server.js:697-734 (registration)The registration of the 'step_out' tool on the MCP server using server.tool(), including the name, description, empty schema (no parameters), and the handler function.server.tool( "step_out", "Steps out of current function", {}, async () => { try { // Ensure debugger is enabled if (!inspector.debuggerEnabled) { await inspector.enableDebugger(); } if (!inspector.paused) { return { content: [{ type: "text", text: "Debugger is not paused at a breakpoint" }] }; } await inspector.send('Debugger.stepOut', {}); return { content: [{ type: "text", text: "Stepped out of current function" }] }; } catch (err) { return { content: [{ type: "text", text: `Error stepping out: ${err.message}` }] }; } } );
- src/mcp-server.js:700-700 (schema)The input schema for the 'step_out' tool, which is empty as it requires no parameters.{},