def OnRun(self): time.sleep( 5 ) #this one will only start later on (because otherwise we may not have any non-daemon threads run_traced = True if pydevd_vm_type.GetVmType( ) == pydevd_vm_type.PydevdVmType.JYTHON and sys.hexversion <= 0x020201f0: #don't run untraced threads if we're in jython 2.2.1 or lower #jython bug: if we start a thread and another thread changes the tracing facility #it affects other threads (it's not set only for the thread but globally) #Bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1870039&group_id=12867&atid=112867 run_traced = False if run_traced: pydevd_tracing.SetTrace(None) # no debugging on this thread try: while not self.killReceived: try: self.pyDb.processInternalCommands() except: PydevdLog(0, 'Finishing debug communication...(2)') time.sleep(0.5) except: pass
def __init__(self, sock): PyDBDaemonThread.__init__(self) self.sock = sock self.setName("pydevd.Writer") self.cmdQueue = PydevQueue.Queue() if pydevd_vm_type.GetVmType() == 'python': self.timeout = 0 else: self.timeout = 0.1
def __init__(self, sock): ProfDaemonThread.__init__(self) self.sock = sock self.setName("profiler.Writer") self.messageQueue = _queue.Queue() if pydevd_vm_type.GetVmType() == 'python': self.timeout = 0 else: self.timeout = 0.1
def __init__(self, sock): PyDBDaemonThread.__init__(self) self.setDaemon(False) #writer isn't daemon to be able to deliver all messages after main thread terminated self.sock = sock self.setName("pydevd.Writer") self.cmdQueue = _queue.Queue() if pydevd_vm_type.GetVmType() == 'python': self.timeout = 0 else: self.timeout = 0.1
try: GetFrame = sys._getframe except AttributeError: def GetFrame(): raise AssertionError('sys._getframe not available (possible causes: enable -X:Frames on IronPython?)') #Used to determine the maximum size of each variable passed to eclipse -- having a big value here may make #the communication slower -- as the variables are being gathered lazily in the latest version of eclipse, #this value was raised from 200 to 1000. MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 1000 import os import pydevd_vm_type IS_JYTHON = pydevd_vm_type.GetVmType() == pydevd_vm_type.PydevdVmType.JYTHON #======================================================================================================================= # Python 3? #======================================================================================================================= IS_PY3K = False IS_PY27 = False IS_PY24 = False try: if sys.version_info[0] >= 3: IS_PY3K = True elif sys.version_info[0] == 2 and sys.version_info[1] == 7: IS_PY27 = True elif sys.version_info[0] == 2 and sys.version_info[1] == 4: IS_PY24 = True except AttributeError: