Quick Start


Home » Support » Index of All Documentation » Wing IDE Reference Manual » Debugger »

Wing IDE can be used to debug all sorts of Python code, including scripts and stand-alone applications written with wxPython, Tkinter, PyQt, PyGTK, and pygame. Wing can also debug web CGIs including those running under mod_python, code running under Zope, Plone, Turbogears, Django, Paste/Pylons, Twisted, and code running in an embedded Python interpreter.

This section describes how to debug stand-alone scripts and applications that can be launched from within Wing IDE. If you wish to debug web CGIs within the web server, web servlets, or embedded Python scripts, please refer to Debugging Externally Launched Code and, for remote host-to-host debugging, see Remote Debugging.

Before debugging, you will need to install Python on your system if you have not already done so. Python is available from www.python.org.

To debug Python code with Wing, open up the Python file and select Start / Continue from the Debug menu. This will run to the first breakpoint, unhandled exception, or until the debug program completes. Select Step Into instead to run to the first line of code.

Use the Debug I/O tool to view your program's output, or to enter values for input to the program. If your program depends on characteristics of the Windows Console or a particular Linux/Unix shell, see External I/O Consoles for more information.

In some cases, you may also need to enter a PYTHONPATH and other environment values using the Project Properties dialog available from the Project menu. This can also be used to specify which Python executable should be used to run with your debug process. Use this if Wing IDE cannot find Python on your system or if you have more than one version of Python installed.

To set breakpoints, just click on the leftmost part of the margin next to the source code. In Wing IDE Professional, conditional and ignore-counted breakpoints are also available from the Breakpoint Options group in the Debug menu, or by right-clicking on the breakpoints margin.

« 12. DebuggerTable of Contents12.1. Specifying Main Entry Point »