Skip to main content
Glama

remove_breakpoint

Remove debugging breakpoints in PHP applications by specifying the breakpoint ID to stop execution at specific code points during debugging sessions.

Instructions

Remove a breakpoint by its ID. Works for both active session breakpoints and pending breakpoints.

Input Schema

NameRequiredDescriptionDefault
breakpoint_idYesThe breakpoint ID to remove (session breakpoint ID or pending_* ID)
session_idNoSession ID

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "breakpoint_id": { "description": "The breakpoint ID to remove (session breakpoint ID or pending_* ID)", "type": "string" }, "session_id": { "description": "Session ID", "type": "string" } }, "required": [ "breakpoint_id" ], "type": "object" }

Implementation Reference

  • The MCP tool handler for 'remove_breakpoint'. Handles removal of both pending breakpoints (if ID starts with 'pending_') by calling pendingBreakpoints.removeBreakpoint, or active session breakpoints by resolving the session and calling session.removeBreakpoint. Returns a standardized JSON response with success status and message.
    async ({ breakpoint_id, session_id }) => { // Check if it's a pending breakpoint if (breakpoint_id.startsWith('pending_')) { const success = pendingBreakpoints.removeBreakpoint(breakpoint_id); return { content: [ { type: 'text', text: JSON.stringify({ success, breakpoint_id, message: success ? 'Pending breakpoint removed' : 'Failed to remove pending breakpoint (may not exist)', }), }, ], }; } const session = sessionManager.resolveSession(session_id); if (!session) { return { content: [ { type: 'text', text: JSON.stringify({ error: 'No active debug session' }), }, ], }; } const success = await session.removeBreakpoint(breakpoint_id); return { content: [ { type: 'text', text: JSON.stringify({ success, breakpoint_id, message: success ? 'Breakpoint removed' : 'Failed to remove breakpoint (may not exist)', }), }, ], };
  • Zod input schema defining parameters for the 'remove_breakpoint' tool: required breakpoint_id (string) and optional session_id (string).
    { breakpoint_id: z.string().describe('The breakpoint ID to remove (session breakpoint ID or pending_* ID)'), session_id: z.string().optional().describe('Session ID'),
  • Registration of the 'remove_breakpoint' MCP tool using server.tool(), specifying name, description, input schema, and handler function within registerBreakpointTools.
    server.tool( 'remove_breakpoint', 'Remove a breakpoint by its ID. Works for both active session breakpoints and pending breakpoints.',
  • PendingBreakpointsManager.removeBreakpoint(id: string): boolean - removes a pending breakpoint by ID from the internal Map and emits event if successful.
    removeBreakpoint(id: string): boolean { const removed = this.pendingBreakpoints.delete(id); if (removed) { logger.info(`Pending breakpoint removed: ${id}`); this.emit('breakpointRemoved', id); } return removed;
  • DebugSession.removeBreakpoint(breakpointId: string): Promise<boolean> - sends DBGP breakpoint_remove command, deletes from local cache if successful, returns true on success.
    async removeBreakpoint(breakpointId: string): Promise<boolean> { const response = await this.connection.sendCommand('breakpoint_remove', { d: breakpointId, }); if (!response.error) { this.breakpoints.delete(breakpointId); logger.debug(`Breakpoint removed: ${breakpointId}`); return true; } return false;

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