Debugger Quick Start

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


Wing can be used to debug all sorts of Python code, including applications written with wxPython, Tkinter, PyQt, PyGObject, matplotlib, Jupyter and pygame. Wing can also debug code written for frameworks like Django, Flask, Pyramid, mod_wsgi, Plone 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.

Note: This section describes how to get started with Wing's debugger when you are working with locally stored code that can be launched 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 python.org, or you can use a distribution like Anaconda to also install many third party libraries.

To start debugging some Python code, open up the file in the editor and then 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. For details see Starting Debug.

To set breakpoints, just click on the left-most margin next to the source code in the editor. 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. For details, see Setting Breakpoints.

Use the Debug I/O tool to view your program's output, or to enter values for input to the program you are debugging. 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 need to specify a Python Executable, Python Path or other environment using Project Properties in the Project menu. Setting the Python Executable is only necessary if Wing cannot find Python on your system or if you have more than one version of Python installed. Command line arguments to use when debugging a file may be set in File Properties for the file. See Debug Environment for more options.

There are many other capabilities available in the debugger, as described in the rest of this chapter and Advanced Debugging Topics.