diff --git a/src/debugpy/adapter/clients.py b/src/debugpy/adapter/clients.py index 1e58802a..0b4a870a 100644 --- a/src/debugpy/adapter/clients.py +++ b/src/debugpy/adapter/clients.py @@ -700,6 +700,12 @@ def disconnect_request(self, request): except Exception: log.swallow_exception() + # Close the client channel since we disconnected from the client. + try: + self.channel.close() + except Exception: + log.swallow_exception(level="warning") + def disconnect(self): super().disconnect()