There are several ways in which to start a debug session from within Wing (some of these are omitted in Wing Personal and Wing 101):
- Choose Start / Continue from the Debug menu or push the Debug icon in the toolbar. This will run the main debug file if one has been defined (described in Setting a Main Debug File), or otherwise the file open in the frontmost editor window. Execution stops at the first breakpoint or exception, or upon program completion.
- Choose Step Into from the Debug menu or push the Step Into icon in the toolbar. This will run the main debug file if one has been defined, or otherwise the file open in the frontmost editor window. Execution stops at the first line of code.
- Choose Debug Current File from the Debug menu or Debug Selected from the right-click popup menu on the Project tool to run a specific file regardless of whether a main debug file has been specified for your project. This will stop on the first breakpoint or exception, or upon program completion.
- Choose Run to Cursor from the Debug menu or toolbar. This will run the main debug file if one has been defined or otherwise the file open in the frontmost editor window. Execution continues until it reaches the line selected in the current source text window, until a breakpoint or exception is encountered, or until program completion.
- Use Debug Recent in the Debug menu to select a recently debugged file. This will stop on the first breakpoint or exception, or upon program completion.
- In Wing Pro, create and launch a Named Entry Point from the Debug menu.
- Use one of the key bindings given in the Debug menu.
- Code can also be debugged from the Python Shell by clicking on the bug icon in the top right of the tool and entering some code or using the Evaluate options in the Source menu.
Additional options exist for initiating a debug session from outside of Wing and for attaching to an already-running process. These are described in sections Debugging Externally Launched Code and Attaching, respectively.
Once a debug process has been started, the status indicator in the lower left of the window should change from white or grey to another color, as described in Debugger Status.
Note that when debugging code from the Python Shell the debugger only appears active if code is actually running and the shell is not at the prompt.
Custom Python Compilations
Wing's debugger contains an extension module that uses the cross-Python API to support multiple versions of Python with a single compilation of the module. This should cover most custom compilations of Python, but there may be cases where you will need to recompile the debugger core module to match your compilation of Python. This is possible with Wing Pro, which includes access to the source code under NDA. Please contact us for details.