There are several ways in which to start a debug session from within Wing:
- 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.
- 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.
If you are attempting to run your debug process against a non-standard version of Python, for example one that has been compiled with altered values for Py_TRACE_REFS or WITH_CYCLE_GC, or that has been altered in other ways, you may need to recompile the debugger core module. This is only possible with Wing IDE Professional, as it requires access to the source code. Please contact us for details.