On Wed, Feb 10, 2010 at 9:58 AM, Escalona, Diego
<Die...@di...> wrote:
> 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?
>
>
>
Just answered you in the forum:
https://sourceforge.net/projects/pydev/forums/forum/293649/topic/3549899
Cheers,
Fabio
|