summaryrefslogtreecommitdiff
path: root/python3
diff options
context:
space:
mode:
authorIke Devolder <ike.devolder@gmail.com>2019-07-05 21:22:04 +0200
committerGitHub <noreply@github.com>2019-07-05 21:22:04 +0200
commitacc73be03654fca6cd9ddd921b9e3bc17f4a6aef (patch)
tree91a741d7b665a437dbaf41dcaf732fde42ace175 /python3
parent45c8f9b334f1968f8841cc69b89da538cd5095aa (diff)
parentdaa3338c9ee8a948299673f025f06cde0f934ce0 (diff)
downloadvdebug-acc73be03654fca6cd9ddd921b9e3bc17f4a6aef.zip
Merge pull request #416 from vim-vdebug/fix-detach-no-session
first check connection before detaching
Diffstat (limited to 'python3')
-rw-r--r--python3/vdebug/session.py6
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):