Skip to main content
Glama

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
NameRequiredDescriptionDefault
session_idNoSession ID

Implementation Reference

  • 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), }), }, ], }; } }
  • 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'), },
  • 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), }), }, ], }; } } );

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/kpanuragh/xdebug-mcp'

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