[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 4 12:36:09 PDT 2025
================
@@ -491,13 +495,11 @@ def wait_for_terminated(self, timeout: Optional[float] = None):
raise ValueError("didn't get terminated event")
return event_dict
- def get_initialize_value(self, key):
+ def get_capability(self, key, default=None):
"""Get a value for the given key if it there is a key/value pair in
- the "initialize" request response body.
+ the capabilities reported by the adapter.
"""
- if self.initialize_body and key in self.initialize_body:
- return self.initialize_body[key]
- raise ValueError(f"no value for key: {key} in {self.initialize_body}")
+ return self.capabilities.get(key, default)
----------------
ashgti wrote:
Updated this to raise and also updated the test to have a specific assert for checking capabilities.
https://github.com/llvm/llvm-project/pull/142831
More information about the lldb-commits
mailing list