Re: [Boa Constr] Multithreaded debugging
Status: Beta
Brought to you by:
riaan
From: Riaan B. <riaan@e.co.za> - 2004-09-13 18:45:48
|
Hi Raefer, Raefer Gabriel wrote: >I recently picked up Boa Constructor, which I tried out perhaps 2 years ago >when I was last using wxPython. I'm very impressed with the progress, this >development environment is coming along very nicely. > >My one problem right now is the debugger - it's great, but like most of the >Python IDEs I've seen, only supports debugging single-threaded apps (or >rather, breakpoints aren't hit by the execution path of other threads). > > It does support debugging threads. >I was trying to find some way to debug a multithreaded app and discovered >this post (http://sourceforge.net/mailarchive/message.php?msg_id=1423854) >which seems to indicate a workaround that's used with Zope and I discovered >works with any multithreaded application - as long as the relevant thread of >execution hits a hard sys.breakpoint() call at some point, it seems that it >will hit regular breakpoints thereafter, though it seems this essentially >"switches" the thread that's being debugged, and it's not clear whether you >can reliably "switch back" to the original thread (with another call to >sys.breakpoint() perhaps?). > > Indeed, sys.breakpoint() was added primarily to support debugging threads, and yes you can reliably switch back to the main thread by hitting another sys.breakpoint(). Cheers, Riaan. |