continue
Resume PHP script execution in Xdebug debugging sessions, continuing until the next breakpoint is encountered or the script completes.
Instructions
Continue script execution until the next breakpoint or end of script
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | Session ID |
Implementation Reference
- src/tools/execution.ts:20-68 (handler)The main handler function for the 'continue' tool. It resolves the debug session by ID (if provided), calls `session.run()` to continue execution until the next breakpoint or script end, and returns a JSON text response with the resulting status, file, line, and message.async ({ session_id }) => { const session = sessionManager.resolveSession(session_id); if (!session) { return { content: [ { type: 'text', text: JSON.stringify({ error: 'No active debug session' }), }, ], }; } try { const result = await session.run(); return { content: [ { type: 'text', text: JSON.stringify({ status: result.status, file: result.file, line: result.line, message: result.status === 'break' ? `Stopped at ${result.file}:${result.line}` : result.status === 'stopped' ? 'Script execution completed' : `Status: ${result.status}`, }), }, ], }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ error: 'Execution failed', message: error instanceof Error ? error.message : String(error), }), }, ], }; } }
- src/tools/execution.ts:17-19 (schema)Input schema for the 'continue' tool, using Zod. Accepts an optional `session_id` string to specify which debug session to continue.{ session_id: z.string().optional().describe('Session ID'), },
- src/tools/execution.ts:14-69 (registration)Registration of the 'continue' tool on the MCP server within the `registerExecutionTools` function. This is called from src/tools/index.ts during tool setup.server.tool( 'continue', 'Continue script execution until the next breakpoint or end of script', { session_id: z.string().optional().describe('Session ID'), }, async ({ session_id }) => { const session = sessionManager.resolveSession(session_id); if (!session) { return { content: [ { type: 'text', text: JSON.stringify({ error: 'No active debug session' }), }, ], }; } try { const result = await session.run(); return { content: [ { type: 'text', text: JSON.stringify({ status: result.status, file: result.file, line: result.line, message: result.status === 'break' ? `Stopped at ${result.file}:${result.line}` : result.status === 'stopped' ? 'Script execution completed' : `Status: ${result.status}`, }), }, ], }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ error: 'Execution failed', message: error instanceof Error ? error.message : String(error), }), }, ], }; } } );