[wingide-users] Re: wingide-users Digest, Vol 32, Issue 9

Wingware Support support at wingware.com
Tue Dec 12 09:15:59 MST 2006


A couple of comments on these steps, in case they are useful to 
others:

On Mon, 11 Dec 2006, Tony Cappellini wrote:
> 1. Add these lines ABOVE **ALL* imports in the **main** file
> try:
>   import wingdbstub:
> except ImportError:
>   pass    # or print a message if needed.
> 
> #This prevents users who don't have Wing from an exception, if you
> accidentally check your code into version control without removing  import
> #wingdbstub

Placing the import first isn't a requirement but does avoid 
problems in some cases, for example if the debug process changes 
directories while running and there are partial paths in the code 
objects.  

In some other cases, like in a threaded app, it may actually work 
better to place the import close to the code you're trying to 
debug.

> 2. Copy  wingdbstub.py from the Program Files\Wing IDE 2.x directory to the
> directory where your project main file is.
> 3. Edit the wingdbstub.py file IN YOUR PROJECT DIRECTORY, not the program
> files directory, as follows
> kEmbedded = 1

This is only needed for certain types of run environments, where 
Python is embedded (including non-cgi web environments).  It 
disables some of Wing's automatic detection of process exit since 
exiting the last stack frame doesn't have the same meaning in the 
embedded case.

> 4. Copy the .wingdebugpw file    from c:\Documents and Settings\YOUR
> USERNAME\Application Data\Wing IDE 2>
>    to your project directory.

This should only be needed if debugging remotely or on the same 
machine where the debug process is running as a different user 
than the user that is running Wing IDE.

> 5. Under Preferences, Debugger, External Remote, Check the "Enable Passive
> Listen" check box.
>   Make sure you UNCHECK this box when finsihed this type of debug, because
> there may be a performance hit using the  debugger with this feature
> enabled.

This is also accessible in the popup on the bug icon in the lower 
left of the window.

> Your firewall/antivrus/network connections *may* require special
> considerations not addresses above.

Aside from firewall config, if you're remote debugging you would 
also need to edit wingdbstub's kWingHostPort setting among other 
things.  The complete list of steps is here:

http://wingware.com/doc/debug/remote-debugging

Stephan Deibel

--
Wingware
Wing IDE for Python
Advancing Software Development

www.wingware.com


More information about the wingide-users mailing list