--- a/DebugClients/Python/DebugBase.py Sun Jul 17 22:40:53 2016 +0200 +++ b/DebugClients/Python/DebugBase.py Mon Jul 18 22:12:12 2016 +0200 @@ -14,6 +14,8 @@ import atexit import inspect import ctypes +import thread +import time from DebugProtocol import ResponseClearWatch, ResponseClearBreak, \ ResponseLine, ResponseSyntax, ResponseException, CallTrace @@ -91,6 +93,18 @@ self.__recursionDepth = -1 self.setRecursionDepth(inspect.currentframe()) + + # background task to periodicaly check for client interactions + self.eventPollFlag = False + self.timer = thread.start_new_thread(self.__eventPollTimer, ()) + + def __eventPollTimer(self): + """ + Private method to set a flag every 0.5 s to check for new messages. + """ + while True: + time.sleep(0.5) + self.eventPollFlag = True def getCurrentFrame(self): """ @@ -245,7 +259,9 @@ return # None # give the client a chance to push through new break points. - self._dbgClient.eventPoll() + if self.eventPollFlag: + self._dbgClient.eventPoll() + self.eventPollFlag = False if event == 'line': if self.stop_here(frame) or self.break_here(frame):