Debugging Extension Scripts

Index of All Documentation » Wing Pro Reference Manual » Scripting and Extending Wing »

Wing can debug extension scripts that you develop for the IDE. This is done by setting up a new project from Wing's Project menu. Select the default project type and for Python Executable select Custom and enter the full path to the python executable that Wing uses to run itself. On OS X and Linux this will be:


On Windows use this is instead:


In the above WINGHOME must be replaced by the location at which Wing is installed (or on OS X the full path to the Contents/Resources folder within the application bundle directory, for example /Applications/

Press OK in the New Project dialog to create the project, then select Add Existing Directory from the Project menu and add Wing's installation directory (same as WINGHOME you used in the above, or on OS X you can instead add just the Contents/Resources folder within the directory).

Next navigate to bin/ in the Project tool, right click on it, and select Set As Main Debug File.

Finally, on OS X only you will need to open Project Properties from the Project menu, select Add To inherited environment under Environment and enter the following text:


If you didn't install Wing in the /Applications folder then you will need to edit the text to specify the correct installation location.

Then save your project to disk.

You should now be able to select Start/Continue 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 the following section.