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
| Name | Required | Description | Default |
|---|---|---|---|
| breakpoint_id | Yes | The breakpoint ID to remove (session breakpoint ID or pending_* ID) | |
| session_id | No | Session 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
- src/tools/breakpoints.ts:309-357 (handler)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)', }), }, ], };
- src/tools/breakpoints.ts:305-307 (schema)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'),
- src/tools/breakpoints.ts:302-304 (registration)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;
- src/session/session.ts:230-240 (helper)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;