================ @@ -466,8 +466,15 @@ def attach( # if we throw an exception during the test case. def cleanup(): if disconnectAutomatically: - self.dap_server.request_disconnect(terminateDebuggee=True) - self.dap_server.terminate() + try: ---------------- ashgti wrote:
We could add both of these as two distinct cleanups. Exceptions thrown in a `addTearDownHook` are logged already, but I think the goal of this change is to ensure the .terminate is called. The hooks are called in FIFO order, so we could change this to: ``` if disconnectAutomatically: self.addTearDownHook(lambda: self.dap_server.request_disconnect(terminateDebuggee=True)) self.addTearDownHook(lambda: self.dap_server.terminate()) ``` https://github.com/llvm/llvm-project/pull/155335 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits