Debugging Extension Scripts

Classic+

Wing can debug extension scripts that you develop for the IDE. To do this, you will need to create a new project with New Project in Wing's Project menu. Select the Existing directory card and enter the full path of Wing's Install Directory, as listed in Wing's About box, as the Source Directory. Then, under Python, set Environment to Existing Python, choose Other: in Python Executable, and enter the full path to Wing's Python, which is located under the Install Directory as follows:

macOS: bin/__os__/macos/runtime-python3.14/bin/python3.14

Linux: bin/__os__/linux-x64/runtime-python3.14/bin/python3.14 (linux-arm64 on ARM)

Windows: bin\__os__\win32\runtime-python3.14\python.exe (win-arm64 on ARM)

Be sure to use the full path to the executable and not the above partial paths.

Press Create Project in the New Project dialog to create the project and save it to disk when prompted or at any time with Save Project As in the Project menu.

Next navigate to bootstrap/wing.py in the Project tool, right click on it, and select Set As Main Entry Point.

Then set up Wing to run Python in optimized mode, so it can load the precompiled code in your Wing installation, by setting Python Options under the Debug/Execute tab of Project Properties to Custom with a value of -u -O.

You should now be able to select Start/Continue from the Debug menu to start up a copy of Wing in the debugger. Any breakpoints set in scripts that you have added in the scripts directory will be reached as you work with the debugged copy of Wing. You will see and can navigate the entire stack, but Wing will not be able to show files for most of Wing's code. If you need to see the source code of Wing itself, you will have to obtain the source code as described in Advanced Scripting.