list_breakpoints
List all active breakpoints for debugging NodeJS code within the MCP NodeJS Debugger, enabling efficient inspection and management of breakpoints in real-time.
Instructions
Lists all active breakpoints
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.js:820-851 (handler)The main handler function for the list_breakpoints tool. It ensures the debugger is enabled, checks if there are any breakpoints in the inspector.breakpoints Map, converts them to an array, and returns a JSON stringified list or appropriate messages.try { // Ensure debugger is enabled if (!inspector.debuggerEnabled) { await inspector.enableDebugger(); } if (inspector.breakpoints.size === 0) { return { content: [{ type: "text", text: "No active breakpoints" }] }; } const breakpointsList = Array.from(inspector.breakpoints.values()); return { content: [{ type: "text", text: JSON.stringify(breakpointsList, null, 2) }] }; } catch (err) { return { content: [{ type: "text", text: `Error listing breakpoints: ${err.message}` }] }; } }
- src/mcp-server.js:816-852 (registration)Registers the list_breakpoints tool with the MCP server, including name, description, empty input schema, and handler function."list_breakpoints", "Lists all active breakpoints", {}, async () => { try { // Ensure debugger is enabled if (!inspector.debuggerEnabled) { await inspector.enableDebugger(); } if (inspector.breakpoints.size === 0) { return { content: [{ type: "text", text: "No active breakpoints" }] }; } const breakpointsList = Array.from(inspector.breakpoints.values()); return { content: [{ type: "text", text: JSON.stringify(breakpointsList, null, 2) }] }; } catch (err) { return { content: [{ type: "text", text: `Error listing breakpoints: ${err.message}` }] }; } } );
- src/mcp-server.js:42-42 (helper)The Map in the Inspector class that stores active breakpoints, populated by set_breakpoint and read by list_breakpoints.this.breakpoints = new Map();