{"record":{"id":"20729059e059ee55","repo":"can1357/oh-my-pi","slug":"name-is-required-for-data-breakpoint-info","errorCode":null,"errorMessage":"name is required for data_breakpoint_info","messagePattern":"name is required for data_breakpoint_info","errorType":"validation","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/debug.ts","lineNumber":877,"sourceCode":"\t\t\tcase \"remove_instruction_breakpoint\": {\n\t\t\t\trequireCapability(\"supportsInstructionBreakpoints\", \"instruction breakpoints\");\n\t\t\t\tif (!params.instruction_reference) {\n\t\t\t\t\tthrow new ToolError(\"instruction_reference is required for remove_instruction_breakpoint\");\n\t\t\t\t}\n\t\t\t\tconst response = await dapSessionManager.removeInstructionBreakpoint(\n\t\t\t\t\tparams.instruction_reference,\n\t\t\t\t\tparams.offset,\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.instructionBreakpoints = response.breakpoints;\n\t\t\t\treturn result.text(formatInstructionBreakpoints(response.breakpoints)).done();\n\t\t\t}\n\t\t\tcase \"data_breakpoint_info\": {\n\t\t\t\trequireCapability(\"supportsDataBreakpoints\", \"data breakpoints\");\n\t\t\t\tif (!params.name) {\n\t\t\t\t\tthrow new ToolError(\"name is required for data_breakpoint_info\");\n\t\t\t\t}\n\t\t\t\tconst response = await dapSessionManager.dataBreakpointInfo(\n\t\t\t\t\tparams.name,\n\t\t\t\t\tparams.variable_ref ?? params.scope_id,\n\t\t\t\t\tparams.frame_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.dataBreakpointInfo = response.info;\n\t\t\t\treturn result.text(formatDataBreakpointInfo(response.info)).done();\n\t\t\t}\n\t\t\tcase \"set_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 set_data_breakpoint\");\n\t\t\t\t}\n\t\t\t\tconst response = await dapSessionManager.setDataBreakpoint(","sourceCodeStart":859,"sourceCodeEnd":895,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/debug.ts#L859-L895","documentation":"The data_breakpoint_info action throws this ToolError when params.name is missing. Data breakpoint info queries which data IDs (and access modes) are available for a named expression/variable, so the variable name is mandatory. Capability supportsDataBreakpoints is checked first.","triggerScenarios":"Calling action=data_breakpoint_info with params.name empty, undefined, or omitted; optional variable_ref/scope_id/frame_id may be present but name is still required.","commonSituations":"Caller only supplies a frame_id expecting info for the whole frame; name key typo'd (e.g. variableName); agent copies a watch-expression object instead of the name string.","solutions":["Pass the variable/expression name, e.g. {name: 'myVar', frame_id: currentFrameId}","Optionally add variable_ref or scope_id to disambiguate the scope of the name","Confirm the debug adapter supports data breakpoints before calling"],"exampleFix":"// before\nawait debugTool.run({ action: 'data_breakpoint_info', frame_id: 1 });\n// after\nawait debugTool.run({ action: 'data_breakpoint_info', name: 'myVar', frame_id: 1 });","handlingStrategy":"validation","validationCode":"if (typeof params.name !== 'string' || params.name.trim().length === 0) {\n  throw new Error('data_breakpoint_info needs a variable name');\n}","typeGuard":"function hasName(p) {\n  return typeof p === 'object' && p !== null\n    && typeof (p as { name?: unknown }).name === 'string'\n    && (p as { name: string }).name.trim().length > 0;\n}","tryCatchPattern":"try {\n  await debugTool.run({ action: 'data_breakpoint_info', ...params });\n} catch (err) {\n  if (err instanceof ToolError && err.message.includes('name is required')) {\n    // resolve the variable name from the current frame/scopes, then retry\n  } else throw err;\n}","preventionTips":["Always include the watch expression name; frame_id alone is not enough","Resolve variable names from scopes/variables responses rather than freeform text","Check supportsDataBreakpoints capability before issuing data breakpoint calls"],"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"}