delete_breakpoint
Remove a breakpoint from NodeJS debugging sessions by specifying its ID to control code execution flow.
Instructions
Deletes a specified breakpoint
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| breakpointId | Yes | ID of the breakpoint to remove |
Implementation Reference
- src/mcp-server.js:783-811 (handler)The main handler function that executes the delete_breakpoint tool logic: ensures debugger enabled, sends 'Debugger.removeBreakpoint' command to the inspector WebSocket, removes from local breakpoints tracking, and returns success/error message.async ({ breakpointId }) => { try { // Ensure debugger is enabled if (!inspector.debuggerEnabled) { await inspector.enableDebugger(); } await inspector.send('Debugger.removeBreakpoint', { breakpointId: breakpointId }); // Remove from our local tracking inspector.breakpoints.delete(breakpointId); return { content: [{ type: "text", text: `Breakpoint ${breakpointId} removed` }] }; } catch (err) { return { content: [{ type: "text", text: `Error removing breakpoint: ${err.message}` }] }; } }
- src/mcp-server.js:780-782 (schema)Input schema definition using Zod for the breakpointId parameter.{ breakpointId: z.string().describe("ID of the breakpoint to remove") },
- src/mcp-server.js:777-812 (registration)Registration of the delete_breakpoint tool on the MCP server using server.tool, including name, description, schema, and handler.server.tool( "delete_breakpoint", "Deletes a specified breakpoint", { breakpointId: z.string().describe("ID of the breakpoint to remove") }, async ({ breakpointId }) => { try { // Ensure debugger is enabled if (!inspector.debuggerEnabled) { await inspector.enableDebugger(); } await inspector.send('Debugger.removeBreakpoint', { breakpointId: breakpointId }); // Remove from our local tracking inspector.breakpoints.delete(breakpointId); return { content: [{ type: "text", text: `Breakpoint ${breakpointId} removed` }] }; } catch (err) { return { content: [{ type: "text", text: `Error removing breakpoint: ${err.message}` }] }; } } );