step_over
Advance code execution to the next line, executing the current line without entering function calls to isolate and assess program flow.
Instructions
Steps over to the next line of code
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.js:616-654 (registration)Registration of the 'step_over' tool via server.tool() with name 'step_over' and description 'Steps over to the next line of code'.
// Step over tool server.tool( "step_over", "Steps over to the next line of code", {}, 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.stepOver', {}); return { content: [{ type: "text", text: "Stepped over to next line" }] }; } catch (err) { return { content: [{ type: "text", text: `Error stepping over: ${err.message}` }] }; } } ); - src/mcp-server.js:621-653 (handler)Handler function for the 'step_over' tool. Checks if debugger is enabled and paused, then sends 'Debugger.stepOver' command via the inspector WebSocket.
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.stepOver', {}); return { content: [{ type: "text", text: "Stepped over to next line" }] }; } catch (err) { return { content: [{ type: "text", text: `Error stepping over: ${err.message}` }] }; } } - src/mcp-server.js:230-274 (helper)The Inspector.send() method used by the handler to send the 'Debugger.stepOver' command via WebSocket to the Node.js debugger.
async send(method, params) { return new Promise((resolve, reject) => { const timeout = setTimeout(() => { reject(new Error(`Request timed out: ${method}`)); this.pendingRequests.delete(id); }, 5000); const checkConnection = () => { if (this.connected) { try { const id = Math.floor(Math.random() * 1000000); this.pendingRequests.set(id, { resolve: (result) => { clearTimeout(timeout); resolve(result); }, reject: (err) => { clearTimeout(timeout); reject(err); } }); this.ws.send(JSON.stringify({ id, method, params })); } catch (err) { clearTimeout(timeout); reject(err); } } else { const connectionCheckTimer = setTimeout(checkConnection, 100); // If still not connected after 3 seconds, reject the promise setTimeout(() => { clearTimeout(connectionCheckTimer); clearTimeout(timeout); reject(new Error('Not connected to debugger')); }, 3000); } }; checkConnection(); }); } - src/mcp-server.js:620-620 (schema)The schema for 'step_over' - an empty object {} as it takes no parameters.
{},