Skip to main content
Glama
workbackai
by workbackai

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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}` }] }; } }
  • 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}` }] }; } } );
  • The Map in the Inspector class that stores active breakpoints, populated by set_breakpoint and read by list_breakpoints.
    this.breakpoints = new Map();

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/workbackai/mcp-nodejs-debugger'

If you have feedback or need assistance with the MCP directory API, please join our Discord server