Gijs Korremans wrote:
> I'm trying to debug a multithreaded windowsNT service with Boa
> Constructor but it's not working. I don't know how to debug a service
> (there's nothing on the internet about that) so I've made an extra
> module espacially for the debugger which starts all my threads. (if
> anyone knows how to debug a service, you're welcome to tell me)
> This module is working fine and I can debug it but when I want to
> debug the threads it's not working. I used a code similar like this
> one: import ThreadOne FirstThread = ThreadOne.ThreadOne()
> FirstThread.start() On the second line, I can walk through the
> __init__ with the debugger but after that the debugger is not working
> anymore: The debuggerwindow sais ready instaid of running but the
> thread is still updating the logfile which means it's still running.
> I've used both hard (if hassattr(sys, 'breakpoint'): sys.breakpoint()
> ) and soft (the red dots) breakpoints
I have not debugged a service under windows so I can give no guarantees.
I don't see a problem with it though.
To debug a thread, sys.breakpoint() must be called from within that
thread. At that moment the debugger tracer is reinstalled in that
thread and the debugger breaks on that line.
That is what should happen. If this is what you did and it doesn't
work, then I don't know.