Hello all,

I'm working with Pydev's Remote Debugger and Eclipse and I have a problem with 
multi-thread Python applications. The remote debugger only traces the 
MainThread and the breakpoints it has, but if I try to add a breakpoint to a 
different thread it doesn't stop.

I've written a simple piece of code to test it:

--------------------------------------------------------------------------------

import threading
import time
import pydevd
pydevd.settrace('10.101.1.193', suspend=False)

class myThread(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        i = 10
        while i > 0:
            print "hello ", i
            i = i - 1
            time.sleep(2)

my_thread = myThread("hello!")
my_thread.start()

for i in range(10):
    print "bye ", i
    time.sleep(5)

--------------------------------------------------------------------------------


If I put a breakpoint on the "print hello" line and another one on the "print 
bye" line, the debugger only stops on the "print bye" line, which belongs to 
the main thread.

How could I make the debugger to trace the new thread and stop on its 
breakpoints?

Kind regards.
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to