sessions_step_over
Step over the current line during Python debugging to execute code without entering function calls, using the Debug Adapter Protocol to control execution flow.
Instructions
Step over the current line (requires active breakpoint)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The debug session ID |
Implementation Reference
- src/mcp_debug_tool/server.py:611-665 (handler)The primary handler function for the 'sessions_step_over' MCP tool. It validates the sessionId from arguments, calls SessionManager.step_over_async, serializes the response, and handles errors appropriately.async def _handle_sessions_step_over(self, arguments: dict) -> list[TextContent]: """ Handler for sessions_step_over tool. Steps over the current line. """ try: session_id = arguments.get("sessionId") if not session_id: return [ TextContent( type="text", text=json.dumps({ "error": { "type": "ValueError", "message": "sessionId is required", } }), ) ] response = await self.session_manager.step_over_async(session_id) result = response.model_dump() return [ TextContent( type="text", text=json.dumps(result), ) ] except KeyError as e: return [ TextContent( type="text", text=json.dumps({ "error": { "type": "SessionNotFound", "message": str(e), } }), ) ] except Exception as e: logger.exception("Error in step_over") return [ TextContent( type="text", text=json.dumps({ "error": { "type": type(e).__name__, "message": str(e), } }), ) ]
- src/mcp_debug_tool/server.py:176-189 (registration)Registration of the 'sessions_step_over' tool in the list_tools() function, including name, description, and input schema requiring 'sessionId'.Tool( name="sessions_step_over", description="Step over the current line (requires active breakpoint)", inputSchema={ "type": "object", "properties": { "sessionId": { "type": "string", "description": "The debug session ID", }, }, "required": ["sessionId"], }, ),
- src/mcp_debug_tool/server.py:176-189 (schema)Input schema definition for the 'sessions_step_over' tool, specifying required 'sessionId' parameter.Tool( name="sessions_step_over", description="Step over the current line (requires active breakpoint)", inputSchema={ "type": "object", "properties": { "sessionId": { "type": "string", "description": "The debug session ID", }, }, "required": ["sessionId"], }, ),
- Async wrapper in SessionManager that delegates to synchronous step_over method.async def step_over_async(self, session_id: str) -> BreakpointResponse: """ Async wrapper for step_over. Runs the synchronous step_over in a thread pool to avoid blocking. """ return await asyncio.to_thread(self.step_over, session_id)