{"record":{"id":"1bca4c558a7f8a79","repo":"can1357/oh-my-pi","slug":"data-id-is-required-for-remove-data-breakpoint","errorCode":null,"errorMessage":"data_id is required for remove_data_breakpoint","messagePattern":"data_id is required for remove_data_breakpoint","errorType":"validation","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/debug.ts","lineNumber":910,"sourceCode":"\t\t\t\tif (!params.data_id) {\n\t\t\t\t\tthrow new ToolError(\"data_id is required for set_data_breakpoint\");\n\t\t\t\t}\n\t\t\t\tconst response = await dapSessionManager.setDataBreakpoint(\n\t\t\t\t\tparams.data_id,\n\t\t\t\t\tparams.access_type,\n\t\t\t\t\tparams.condition,\n\t\t\t\t\tparams.hit_condition,\n\t\t\t\t\tcombinedSignal,\n\t\t\t\t\ttimeoutSec * 1000,\n\t\t\t\t);\n\t\t\t\tdetails.snapshot = response.snapshot;\n\t\t\t\tdetails.dataBreakpoints = response.breakpoints;\n\t\t\t\treturn result.text(formatDataBreakpoints(response.breakpoints)).done();\n\t\t\t}\n\t\t\tcase \"remove_data_breakpoint\": {\n\t\t\t\trequireCapability(\"supportsDataBreakpoints\", \"data breakpoints\");\n\t\t\t\tif (!params.data_id) {\n\t\t\t\t\tthrow new ToolError(\"data_id is required for remove_data_breakpoint\");\n\t\t\t\t}\n\t\t\t\tconst response = await dapSessionManager.removeDataBreakpoint(\n\t\t\t\t\tparams.data_id,\n\t\t\t\t\tcombinedSignal,\n\t\t\t\t\ttimeoutSec * 1000,\n\t\t\t\t);\n\t\t\t\tdetails.snapshot = response.snapshot;\n\t\t\t\tdetails.dataBreakpoints = response.breakpoints;\n\t\t\t\treturn result.text(formatDataBreakpoints(response.breakpoints)).done();\n\t\t\t}\n\t\t\tcase \"continue\": {\n\t\t\t\tconst outcome = await dapSessionManager.continue(combinedSignal, timeoutSec * 1000);\n\t\t\t\tdetails.snapshot = outcome.snapshot;\n\t\t\t\tdetails.state = outcome.state;\n\t\t\t\tdetails.timedOut = outcome.timedOut;\n\t\t\t\treturn result.text(buildOutcomeText(outcome, timeoutSec, \"Continue\")).done();\n\t\t\t}\n\t\t\tcase \"step_over\": {","sourceCodeStart":892,"sourceCodeEnd":928,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/debug.ts#L892-L928","documentation":"The remove_data_breakpoint action throws this ToolError when params.data_id is missing. Removal targets the exact data_id the breakpoint was created with; without it the tool refuses the request. Capability supportsDataBreakpoints is checked first.","triggerScenarios":"Calling action=remove_data_breakpoint without params.data_id or with an empty string.","commonSituations":"Caller tries to clear all data breakpoints with empty params; data_id from the set step was not persisted; mixing up data_id with the original variable name.","solutions":["Pass the same data_id returned by data_breakpoint_info and used in set_data_breakpoint","List current data breakpoints (via snapshot) and copy the id from there","Use the clear-all/cancel action if the tool exposes one, instead of empty params"],"exampleFix":"// before\nawait debugTool.run({ action: 'remove_data_breakpoint' });\n// after\nawait debugTool.run({ action: 'remove_data_breakpoint', data_id: 'var-myVar:write' });","handlingStrategy":"validation","validationCode":"if (typeof params.data_id !== 'string' || params.data_id.length === 0) {\n  throw new Error('remove_data_breakpoint needs the data_id used at set time');\n}","typeGuard":"function hasDataId(p) {\n  return typeof p === 'object' && p !== null\n    && typeof (p as { data_id?: unknown }).data_id === 'string'\n    && (p as { data_id: string }).data_id.length > 0;\n}","tryCatchPattern":"try {\n  await debugTool.run({ action: 'remove_data_breakpoint', ...params });\n} catch (err) {\n  if (err instanceof ToolError && err.message.includes('data_id is required')) {\n    // read current data breakpoints from the session snapshot to recover ids, then retry\n  } else throw err;\n}","preventionTips":["Persist the data_id from the set call alongside your watch list","Distinguish data_id from the original variable name","Use the snapshot's dataBreakpoints listing as the source of truth for removal"],"tags":["debug","dap","parameter-validation","data-breakpoint"],"backgroundTag":"missing-required-parameter","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}