- Wing IDE Tutorial
- How-Tos
- Wing IDE Reference Manual
- Python Documentation
- Mailing Lists and Blogs
- Priority Support
- Wing IDE beta release
Follow Wingware:
On FacebookOn LinkedIn
On Twitter
On Reddit.com
On Freshmeat.net
Our Blog
Home » Support » Index of All Documentation » How-Tos » How-Tos for Web Development »
4.6. Using Wing IDE with mod_wsgi

Wing IDE is an integrated development environment that can be used to write, test, and debug Python code that is running under mod_wsgi and other Python-based web development technologies. Wing provides auto-completion, call tips, a powerful debugger, and many other features that help you write, navigate, and understand Python code.
For more information on Wing IDE see the product overview. If you do not already have Wing IDE installed, download a free trial now.
To get started using Wing, refer to the tutorial in the Help menu in Wing and/or the Wing IDE Quickstart Guide.
Debugging Setup
When debugging Python code running under mod_wsgi, the debug process is initiated from outside of Wing IDE, and must connect to the IDE. This is done with wingdbstub according to the instructions in the Debugging Externally Launched Code section of the manual.
Because of how mod_wsqi sets up the interpreter, be sure to set kEmbedded=1 in your copy of wingdbstub.py and use the debugger API to reset the debugger and connection as follows:
import wingdbstub if wingdbstub.debugger != None: wingdbstub.debugger.StopDebug() wingdbstub.debugger.StartDebug()
Note that in some cases you may need to add a short delay between the StopDebug and StartDebug calls, using time.sleep(1).
Then right click on the bug icon in lower left of Wing's window and make sure that Passive Listen is enabled. After that, you should be able to reach breakpoints by loading pages in your browser.
Disabling stdin/stdout Restrictions
In order to debug, may also need to disable the WSGI restrictions on stdin/stdout with the following mod_wsgi configuration directives:
WSGIRestrictStdin Off WSGIRestrictStdout Off
Related Documents
Wing IDE provides many other options and tools. For more information:
- Wing IDE Reference Manual, which describes Wing IDE in detail.
- Wing IDE Quickstart Guide which contains additional basic information about getting started with Wing IDE.
| « 4.5. Using Wing IDE with web2py | Table of Contents | 4.7. Using Wing IDE with mod_python » |
