[wingide-users] thoughts on debugging a combination django/celery site

Wing IDE Support support at wingware.com
Wed Feb 27 16:21:55 EST 2013

On 2/27/13 10:23 AM, Chris Curvey wrote:
> I'm in the process of splitting my monolithic Django application into a
> series of Celery tasks.  Django can kick off a bunch of tasks, then loop
> around to get the results.  (Both the Django code and the Celery code
> live in the same Wing project.)
> Of course, now I have a number of python interpreters to deal with when
> I want to debug.  I had two ideas for how to handle this:
> 1) copy wingdbstub.py to djangodebugstub.py and celerydebugstub.py, and
> import the the files appropriately.  I can then use  kWingDebugDisabled
>  to control which remote process connects to Wing for debugging purposes.
> 2) Copy wingdbstub.py to djangodebugstub.py and celerydebugstub.py,  but
> have different ports for django and celery.  I could then run two Wing
> instances, and debug back and forth between the two.  I'm just not sure
> how to use kWingHostPort and kAttachPort in this situation.  And I'm
> wondering if I would need two Wing projects -- one that contains all the
> Django stuff, and one that only contains the Celery tasks.

I might opt for #2, though I also might try to debug most of the time in
a single process so I could easily step into things as needed.  Multiple
projects may help when debugging two processes if only to have different
project names in the window titles.  The files a project contains has no
affect on runtime behavior in the debugger, so I'd include the set of
files that I wanted to use project-wide tools such as search in files,
find uses, and refactoring on.



More information about the wingide-users mailing list