[wingide-users] Debugging source generated by calling "python myfile.py"

Martijn Pieters mj at zopatista.com
Wed Aug 18 18:09:07 EDT 2004


Wing IDE Support wrote:
> This scenario is somewhat of a pain to debug.  It is possible to run two
> copies of Wing, configure one to use a different TCP/IP port for the debug
> connection, and then set up two copies of wingdbstub that use the
> different ports.  However, if you're running the same file twice you'ld
> have to provide logic to import one copy of wingdbstub the first time and
> another the second.  Not the most elegant solution, obviously, but if you
> decide to do this you'll probably want to use --prefs-file command line
> option when starting the second instance of Wing to avoid fighting between
> the two copies when you configure different debug port numbers.

Doesn't wingdbstub.py also support reading from environment variables? I 
think I once dabbled with using os.environ to tweak the settings for 
wingdbstub.

If you are going to run 'myfile.py' from the first instance via a system 
call, you can set the environment for the second instance explicitly 
when starting it. That should let you specify another debug port just 
like that. Still hacky, with two instances of Wing running, but less so 
than juggling two wingdbstub incarnations.

Just so I can use this opportunity to propose a new feature: add an API 
to wingdbstub to let the importing program set the paramters 
programatically as well. The more opportunities to tweak it's behaviour 
the better.

I-once-pdb-debugged-windbstub-to-solve-a-complex-debug-setup-ly yours,

Martijn Pieters
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : /pipermail/wingide-users/attachments/20040819/e273acca/signature.bin


More information about the wingide-users mailing list