[Lldb-commits] [lldb] [lldb-dap] Preserve watchpoints from console (PR #215228)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 13 08:09:25 PDT 2026


================
@@ -25,7 +25,10 @@ SetDataBreakpointsRequestHandler::Run(
     const protocol::SetDataBreakpointsArguments &args) const {
   std::vector<protocol::Breakpoint> response_breakpoints;
 
-  dap.target.DeleteAllWatchpoints();
+  for (lldb::watch_id_t watch_id : dap.data_breakpoints)
+    dap.target.DeleteWatchpoint(watch_id);
----------------
da-viper wrote:

we lose information (such as hit_count and ignore_count)  on existing watchpoint when setting a new watchpoint. 

if you set a watchpoint you can see the extra information in lldb using `watchpoint list -v`. Once you add another watchpoint you lose the existing watchpoint information since you are removing and adding it. 


https://github.com/llvm/llvm-project/pull/215228


More information about the lldb-commits mailing list