diff -r aa3532e96210 -r 86554f131048 DebugClients/Python/ThreadExtension.py --- a/DebugClients/Python/ThreadExtension.py Wed Mar 29 19:23:50 2017 +0200 +++ b/DebugClients/Python/ThreadExtension.py Wed Mar 29 22:17:43 2017 +0200 @@ -39,6 +39,7 @@ self._original_start_new_thread = None self.threadingAttached = False self.qtThreadAttached = False + self.greenlet = False self.clientLock = threading.RLock() @@ -260,7 +261,7 @@ return None if fullname in [self.threadModName, 'PyQt4.QtCore', 'PyQt5.QtCore', - 'PySide.QtCore', 'PySide2.QtCore', + 'PySide.QtCore', 'PySide2.QtCore', 'greenlet', 'threading'] and self.enableImportHooks: # Disable hook to be able to import original module self.enableImportHooks = False @@ -285,6 +286,14 @@ self._original_start_new_thread = module.start_new_thread module.start_new_thread = self.attachThread + elif (fullname == 'greenlet' and self.greenlet is False): + # Check for greenlet.settrace + if hasattr(module, 'settrace'): + self.greenlet = True + DebugBase.pollTimerEnabled = False + + # TODO: Implement the debugger extension for greenlets + # Add hook for threading.run() elif (fullname == "threading" and self.threadingAttached is False): self.threadingAttached = True