[wingide-users] [wxPython-users] Keeping the wxWidgets loop active at a breakpoint

Robin Dunn robin at alldunn.com
Tue Feb 28 19:15:51 EST 2006

Bill Baxter wrote:
> This is a problem with debugging a program (in Wing) that uses pylab (a 
> graphing module), which in turn uses wxWidgets to display its graphs 
> (I'm using pylab's WXAgg drawing backend).  I'm not sure which community 
> would have the best insight into the issue so please forgive me for 
> crossposting to all three.
> The problem I'm having is very simple.  When I'm stopped at a breakpoint 
> in the IDE, the wxWidgets loop stops running too, so the graphs don't 
> refresh their drawing.
> On the other hand, in the Wing IDE, if I just let the program run to 
> completion, then the graphs disappear before I have a chance to look at 
> them.  wx, pylab, and Wing are all pretty compex things, so I'm not sure 
> where to look for how to fix this particular behavior.
> WX folks: Is there some way to make it so that the wx main loop stay 
> active at an IDEs breakpoint?  Or some way to say at the end of my 
> program "just go into the loop currently in progress".

If the breakpoint is in a event handler, or other code in the gui thread 
there is no way to get back into the main loop without returning from 
the event handler, although it can be simulated with a wx.EventLoop 
instance, but that also needs to be running in the gui thread.  So there 
really isn't a way to do it if you need to stop in the gui thread.

> Pylab folks: Is there a setting that I can use to make graphs run in 
> separate threads or processes?
> Wing folks: is there some Wing setting I can use to change the 
> breakpoint behavior?  Assuming pylab graphs are in a separate thread, 
> would there be some way to specify that a breakpoint shouldn't stop that 
> thread?

Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!

More information about the wingide-users mailing list