list_breakpoints
List all breakpoints in a debugging session, showing their file locations and conditions, to review and manage debugging points.
Instructions
Lists all breakpoints set in a debugging session, including their locations and conditions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ID of the debugging session. |
Implementation Reference
- src/server.ts:613-639 (handler)The handler that executes the list_breakpoints tool logic. It parses the session_id input, calls sessionManager.listBreakpoints(), and returns the breakpoints formatted as JSON.
case 'list_breakpoints': { const params = z.object({session_id: z.string()}).parse(args); const breakpoints = sessionManager.listBreakpoints(params.session_id); return { content: [ { type: 'text', text: JSON.stringify( { breakpoints: breakpoints.map((bp) => ({ id: bp.id, url: bp.url, line_number: bp.lineNumber, column_number: bp.columnNumber, condition: bp.condition, enabled: bp.enabled, })), }, null, 2 ), }, ], }; } - src/types.ts:39-51 (schema)The BreakpointInfo interface type definition used as the return type for list_breakpoints.
export interface BreakpointInfo { id: string; url: string; lineNumber: number; columnNumber?: number; condition?: string; enabled: boolean; resolvedLocations: Array<{ scriptId: string; lineNumber: number; columnNumber: number; }>; } - src/server.ts:161-174 (registration)Registration of the list_breakpoints tool with its name, description, and input schema requiring session_id.
name: 'list_breakpoints', description: 'Lists all breakpoints set in a debugging session, including their locations and conditions.', inputSchema: { type: 'object', properties: { session_id: { type: 'string', description: 'ID of the debugging session.', }, }, required: ['session_id'], }, }, - src/session-manager.ts:258-266 (helper)The listBreakpoints helper method on SessionManager that retrieves all breakpoints from the session's breakpoints map.
/** * Lists all breakpoints in a session. * * @param sessionId - The session ID */ listBreakpoints(sessionId: string): BreakpointInfo[] { const session = this.getSession(sessionId); return Array.from(session.breakpoints.values()); }