Quick Start

Index of All Documentation » Wing Pro Reference Manual » Debugger »


Wing 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 frameworks like Zope, Plone, Turbogears, Django, Paste/Pylons, mod_wsgi, and Twisted, and code running in an embedded Python interpreter in the context of a larger application such as Blender, Maya, Nuke, and Source Filmmaker.

This section describes how to get started with Wing's debugger when you are working with locally stored code that you can launch from the IDE. If you need to launch code from outside of the IDE or on a remote host, see the options given in Debugger.

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 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 Pro, 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.