list_breakpoints
Retrieve a list of all currently active breakpoints in the Node.js debug session to track paused execution points and manage debugging workflow.
Instructions
Lists all active breakpoints
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.js:814-852 (handler)The handler function for the 'list_breakpoints' tool. It ensures the debugger is enabled, checks if any breakpoints exist in the inspector's breakpoints Map, and returns a JSON-formatted list of active breakpoints.
// List all breakpoints tool server.tool( "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:814-852 (registration)The tool is registered using server.tool() with name 'list_breakpoints', a description, an empty schema (no parameters), and the async handler function.
// List all breakpoints tool server.tool( "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:818-818 (schema)The input schema for 'list_breakpoints' is an empty object {} — the tool accepts no parameters.
{}, - src/mcp-server.js:42-43 (helper)The breakpoints data store: this.breakpoints = new Map() on the Inspector class, which stores breakpoints set via the debugger and is read by list_breakpoints.
this.breakpoints = new Map(); this.paused = false;