toggleBreakpoint
Temporarily enable or disable a breakpoint in the VICE C64 Emulator while preserving its configuration for debugging 6502 assembly programs.
Instructions
Enable or disable a breakpoint without deleting it.
Use this to temporarily disable breakpoints while keeping their configuration.
Related tools: setBreakpoint, deleteBreakpoint, listBreakpoints
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| breakpointId | Yes | Breakpoint ID from setBreakpoint | |
| enabled | Yes | True to enable, false to disable |
Implementation Reference
- src/index.ts:662-687 (registration)Registration of the toggleBreakpoint MCP tool, including schema and inline handler function."toggleBreakpoint", { description: `Enable or disable a breakpoint without deleting it. Use this to temporarily disable breakpoints while keeping their configuration. Related tools: setBreakpoint, deleteBreakpoint, listBreakpoints`, inputSchema: z.object({ breakpointId: z.number().describe("Breakpoint ID from setBreakpoint"), enabled: z.boolean().describe("True to enable, false to disable"), }), }, async (args) => { try { await client.toggleCheckpoint(args.breakpointId, args.enabled); return formatResponse({ success: true, breakpointId: args.breakpointId, enabled: args.enabled, message: `Breakpoint ${args.breakpointId} ${args.enabled ? "enabled" : "disabled"}`, }); } catch (error) { return formatError(error as ViceError); } } );
- src/index.ts:674-686 (handler)MCP tool handler: calls ViceClient.toggleCheckpoint and formats success/error response using helpers.async (args) => { try { await client.toggleCheckpoint(args.breakpointId, args.enabled); return formatResponse({ success: true, breakpointId: args.breakpointId, enabled: args.enabled, message: `Breakpoint ${args.breakpointId} ${args.enabled ? "enabled" : "disabled"}`, }); } catch (error) { return formatError(error as ViceError); } }
- src/index.ts:669-672 (schema)Zod input schema validating breakpointId (number) and enabled (boolean).inputSchema: z.object({ breakpointId: z.number().describe("Breakpoint ID from setBreakpoint"), enabled: z.boolean().describe("True to enable, false to disable"), }),
- src/protocol/client.ts:618-629 (helper)ViceClient method implementing toggleCheckpoint: sends VICE CheckpointToggle command (0x15) and updates local checkpoint tracking.async toggleCheckpoint(checkpointId: number, enabled: boolean): Promise<void> { const body = Buffer.alloc(5); body.writeUInt32LE(checkpointId, 0); body[4] = enabled ? 1 : 0; await this.sendCommand(Command.CheckpointToggle, body); // Update local tracking const cp = this.checkpoints.get(checkpointId); if (cp) { cp.enabled = enabled; } }