Home » Support » Index of All Documentation » Wing IDE Reference Manual » Advanced Debugging Topics » Attaching and Detaching »

Identifying Foreign Processes

When debugging externally launched code (as described in Debugging Externally Launched Code), you may use the kAttachPort constant in wingdbstub.py to set the port on which the debug process will listen for attach requests from Wing IDE. This is useful when spawning multiple processes concurrently, or in other cases where the debug process may not be able to attached to Wing IDE as it starts up.

It is important to set unique values for the kAttachPort value for each concurrent, externally-launched process. If the set port is in use, a random port number will be used instead and it may be difficult to determine this number if the process cannot initially contact Wing IDE to register itself.

Once this is done, the debug process can be reached from Wing IDE by typing its host/port into the Attach dialog text areas. If you find yourself typing a host/port value often, it is best to add that value to the Common Attach Hosts preference.

See section Debugging Externally Launched Code for more information.

Identifying Foreign Processes