delete_breakpoint
Removes a breakpoint by its ID to clean up debugger state during Node.js debugging sessions.
Instructions
Deletes a specified breakpoint
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| breakpointId | Yes | ID of the breakpoint to remove |
Implementation Reference
- src/mcp-server.js:783-812 (handler)The async handler function that executes the delete_breakpoint tool logic. It ensures the debugger is enabled, sends Debugger.removeBreakpoint via the inspector, removes the breakpoint from local tracking (breakpoints Map), and returns a success or 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:777-812 (registration)Registration of the delete_breakpoint tool via server.tool() with the name 'delete_breakpoint' and a description.
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}` }] }; } } ); - src/mcp-server.js:780-782 (schema)Input schema for delete_breakpoint defining breakpointId as a required string validated by Zod.
{ breakpointId: z.string().describe("ID of the breakpoint to remove") }, - src/mcp-server.js:42-45 (helper)The Inspector class stores breakpoints in a Map (this.breakpoints) which is used by the delete_breakpoint handler to remove breakpoints from local tracking.
this.breakpoints = new Map(); this.paused = false; this.currentCallFrames = []; this.retryOptions = retryOptions;