listWatchpoints
Display active memory watchpoints in the VICE C64 emulator to monitor specific memory addresses during debugging sessions.
Instructions
List all active memory watchpoints.
Shows watchpoint IDs, address ranges, type (load/store), and status.
Related tools: setWatchpoint, deleteBreakpoint, listBreakpoints
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:752-791 (registration)MCP tool registration for 'listWatchpoints'. Includes tool description, no input schema (parameterless), and handler that retrieves watchpoints from ViceClient, formats them, and returns structured response with metadata.server.registerTool( "listWatchpoints", { description: `List all active memory watchpoints. Shows watchpoint IDs, address ranges, type (load/store), and status. Related tools: setWatchpoint, deleteBreakpoint, listBreakpoints`, }, async () => { const watchpoints = client.listWatchpoints(); if (watchpoints.length === 0) { return formatResponse({ count: 0, watchpoints: [], hint: "No watchpoints set. Use setWatchpoint() to add one.", }); } return formatResponse({ count: watchpoints.length, watchpoints: watchpoints.map((wp) => ({ id: wp.id, startAddress: { value: wp.startAddress, hex: `$${wp.startAddress.toString(16).padStart(4, "0")}`, }, endAddress: { value: wp.endAddress, hex: `$${wp.endAddress.toString(16).padStart(4, "0")}`, }, type: wp.type, enabled: wp.enabled, temporary: wp.temporary, })), hint: `${watchpoints.length} watchpoint(s) active. Use deleteBreakpoint(id) to remove (works for both breakpoints and watchpoints).`, }); } );
- src/protocol/client.ts:644-646 (handler)Core handler function in ViceClient that implements listWatchpoints logic: filters local checkpoints map to return only non-execution (watchpoint) checkpoints.listWatchpoints(): CheckpointInfo[] { return Array.from(this.checkpoints.values()).filter((cp) => cp.type !== "exec"); }
- src/protocol/client.ts:24-31 (schema)TypeScript interface defining the CheckpointInfo structure returned by listWatchpoints, used for input/output typing in the tool.export interface CheckpointInfo { id: number; startAddress: number; endAddress: number; enabled: boolean; temporary: boolean; type: CheckpointType; }
- src/protocol/client.ts:34-35 (helper)Type alias for backwards compatibility, linking BreakpointInfo to CheckpointInfo.export type BreakpointInfo = CheckpointInfo;
- src/protocol/client.ts:22-23 (helper)Union type for checkpoint/watchpoint types, distinguishing execution breakpoints from load/store watchpoints.export type CheckpointType = "exec" | "load" | "store";