diff options
author | Ike Devolder <ike.devolder@gmail.com> | 2019-07-05 21:22:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-05 21:22:04 +0200 |
commit | acc73be03654fca6cd9ddd921b9e3bc17f4a6aef (patch) | |
tree | 91a741d7b665a437dbaf41dcaf732fde42ace175 | |
parent | 45c8f9b334f1968f8841cc69b89da538cd5095aa (diff) | |
parent | daa3338c9ee8a948299673f025f06cde0f934ce0 (diff) | |
download | vdebug-acc73be03654fca6cd9ddd921b9e3bc17f4a6aef.zip |
Merge pull request #416 from vim-vdebug/fix-detach-no-session
first check connection before detaching
-rw-r--r-- | python3/vdebug/session.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python3/vdebug/session.py b/python3/vdebug/session.py index 2e0f5d0..893b8d6 100644 --- a/python3/vdebug/session.py +++ b/python3/vdebug/session.py @@ -222,8 +222,10 @@ class Session: def detach(self): """Detach the debugger engine, and allow it to continue execution. """ - self.__ui.say("Detaching the debugger") - self.__api.detach() + if self.is_connected(): + self.__ui.say("Detaching the debugger") + self.__api.detach() + self.close_connection(False) def __set_features(self): |