Skip to main content
Glama

continue

Resume PHP script execution in Xdebug debugging sessions to proceed to the next breakpoint or until the script completes.

Instructions

Continue script execution until the next breakpoint or end of script

Input Schema

NameRequiredDescriptionDefault
session_idNoSession ID

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "session_id": { "description": "Session ID", "type": "string" } }, "type": "object" }

Implementation Reference

  • The handler function for the 'continue' MCP tool. Resolves the debug session by ID (optional), calls session.run() to continue execution until the next breakpoint or script end, and returns the execution status, location, or error.
    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: optional session_id string parameter.
    { session_id: z.string().optional().describe('Session ID'), },
  • Direct registration of the 'continue' tool using McpServer.tool(), including name, description, schema, and handler.
    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), }), }, ], }; } } );
  • Intermediate registration call to registerExecutionTools within registerAllTools, which registers the 'continue' tool among execution controls.
    registerExecutionTools(server, ctx.sessionManager);
  • src/index.ts:91-91 (registration)
    Top-level registration of all MCP tools, including 'continue', via registerAllTools.
    registerAllTools(mcpServer, toolsContext);

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