list_breakpoints
View all active breakpoints in a Node.js debugging session to monitor pause points and manage code execution flow.
Instructions
Lists all active breakpoints
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.js:819-851 (handler)Handler function that implements the list_breakpoints tool logic: ensures debugger enabled, lists breakpoints from inspector.breakpoints as JSON or handles no breakpoints/error cases.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:815-852 (registration)Registers the 'list_breakpoints' tool with the MCP server using server.tool(), including name, description, empty input schema, and the handler function.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)Empty input schema for the list_breakpoints tool (no parameters required).{},