{"record":{"id":"09424d20e914454b","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-put-breakpoints","errorCode":null,"errorMessage":"Usage: ghidra trace put-breakpoints","messagePattern":"Usage: ghidra trace put-breakpoints","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":1642,"sourceCode":"        b = target.GetWatchpointAtIndex(i)\n        keys.append(WATCHPOINT_KEY_PATTERN.format(watchnum=b.GetID()))\n        put_single_watchpoint(b, proc)\n    cont_obj.insert()\n    cont_obj.retain_values(keys)\n\n\n@convert_errors\ndef ghidra_trace_put_breakpoints(debugger: lldb.SBDebugger, command: str,\n                                 result: lldb.SBCommandReturnObject,\n                                 internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Put the current process's breakpoints into the trace.\n\n    Usage: ghidra trace put-breakpoints\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace put-breakpoints\")\n\n    trace, tx = STATE.require_tx()\n    with trace.client.batch() as b:\n        put_breakpoints()\n\n\n@convert_errors\ndef ghidra_trace_put_watchpoints(debugger: lldb.SBDebugger, command: str,\n                                 result: lldb.SBCommandReturnObject,\n                                 internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Put the current process's watchpoints into the trace.\n\n    Usage: ghidra trace put-watchpoints\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace put-watchpoints\")","sourceCodeStart":1624,"sourceCodeEnd":1660,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L1624-L1660","documentation":"Raised by ghidra_trace_put_breakpoints when any argument is given. The command pushes the current process's breakpoints into the trace and takes no parameters; the len(args)!=0 check at commands.py:1642 rejects all arguments.","triggerScenarios":"Appending a breakpoint id (`put-breakpoints 1`), a process qualifier, or trailing whitespace-split text to the command.","commonSituations":"Users expect to refresh a single breakpoint by id; or pass a process number because the trace is multi-process. The command always operates on the current process.","solutions":["Run it bare: `ghidra trace put-breakpoints`.","To target another process, switch LLDB's selected process first, then run the command.","For a single breakpoint use put-all or rely on hooks/sync to update automatically."],"exampleFix":"// before\nghidra trace put-breakpoints 2\n// after\nghidra trace put-breakpoints","handlingStrategy":"validation","validationCode":"assert len(command.split()) == 0, \"put-breakpoints takes no arguments\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["put-breakpoints always publishes all breakpoints of the current process.","Switch the selected process to target another; don't pass an id.","Prefer sync-enable for automatic breakpoint updates."],"tags":["lldb","ghidra","cli-usage","debugger-agent","breakpoints"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}