Index of All Documentation » Wing Pro Reference Manual »

Wing Pro's Python debugger includes a powerful toolset for rapidly locating and fixing bugs in single and multi-threaded Python code running in a single or multi-process environment. The debugger supports breakpoints, stepping through code, inspecting and changing stack or module data, watch points, expression evaluation, and command shell style interaction with the paused debug process. Code may be run locally, on a remote host, virtual machine or device, or in a container like those provided by Docker.

There are a number of ways to use the debugger. Which one you choose depends on where your code is running, and how it is invoked:

Local Stand-Alone Code -- Wing can debug stand-alone scripts and applications that run on your local machine and that are launched on demand from within Wing. See Debugger Quick-Start for a quick introduction.

Remote Stand-Alone Code -- Wing Pro can debug stand-alone code running on a remote host, virtual machine or device, in the same way as it debugs locally running code. Wing uses a remote agent launched by SSH in order to work directly with files stored on the remote host, as if Wing were itself running on that system. For details, see Remote Development.

Containerized Code -- Wing Pro can also debug code running in containers like those provided by Docker. In this model, the IDE works with the local files that are used to build the container, and launches code for unit tests and debug in the container environment. For details, see Working with Containers and Using Wing Pro with Docker.

Local Externally Launched or Embedded Code -- Wing can debug locally running code that is launched by a web server or framework, embedded Python code that is used to script a larger application, and any other Python code that cannot be directly launched from the IDE. In this case, the code is started from outside Wing and connects to the IDE by importing Wing's debugger. Debug can be controlled from the IDE and through an API accessible from the debug process. For details, see Debugging Externally Launched Code.

Remote Externally Launched or Embedded Code -- Wing Pro can also debug externally launched or embedded code that is running on another host. In this case, Wing uses a remote agent to access the remote host via SSH and the debugged code imports Wing's debugger in order to connect back to the IDE through an automatically established reverse SSH tunnel. For details, see Debugging Externally Launched Remote Code.

Manually Configured Remote Debugging -- Wing can also debug code running on a remote host or device that is not accessible through SSH or where Wing's remote agent cannot be run. In this case, the device must be able to connect to the host where Wing is running via TCP/IP. Connectivity, file sharing, file location mapping, and other configuration needed to make debugging possible is accomplished entirely manually. For details, see Manually Configured Remote Debugging.

Because the debugger core is written in optimized C, debug overhead is relatively low. However, you should expect your code to run 25-30% slower within the debugger. Overhead is proportional to number of Python byte codes executed, so code that does a lot of work in Python and very little in support libraries will incur more overhead.

Wing Personal and Wing 101 omit some of the above features.

Section Contents