[wingide-users] Remoting debugging, many-to-many
support at wingware.com
Mon Aug 4 07:53:23 MDT 2008
Mark A. Schmucker wrote:
> I have a cluster of computers running my Python jobs. I'm successfully
> using Remote Debugging, as described in the manual, to debug from my
> Wing computer. I followed the instructions for Installing the Debugger
> Core, and copied the required files to a shared WINGHOME location on the
> cluster. These "debugger core" files tell the cluster computers to
> connect to Wing on port 50005 (the default).
> So far so good.
> I told my co-worker how great Wing is for remote debugging, so now he
> wants to do the same. The problem is that if my Wing is listening for
> remote connections on port 50005, my co-worker's Wing says it cannot
> listen on 50005- "another instance of Wing is already be listening on
> that port".
> And I still have several more co-workers to convert to Wing :-)
> How can I make this work? I guess each co-workers' debugging session
> must dynamically specify a port, and associate that port with a
> particular job somehow. Note we cannot control which of the
> cluster computers actually executes the Python code- we want whichever
> computer gets the job to connect to a specific instance of Wing. Maybe
> where we "import wingdbstub", we could first set a variable to specify
> the port dynamically. Or maybe there's a better way.
To do this, assign a port to each user, set that in Wing's preferences under
Debugger / External/Remote / Server Port, and then in your code figure out
how to identify which user is debugging and set WINGDB_HOSTPORT environment
variable before importing wingdbstub. This sets kWingHostPort to the
value in the env (see inside wingdbstub.py for comments/details).
Wingware | Python IDE
Advancing Software Development
More information about the wingide-users