Debugging Extension Scripts

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
PythonExecutable 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:

WINGHOME/bin/runtime-python2.7/bin/python

On Windows use this is instead:

WINGHOME\bin\runtime-python2.7\bin\python.exe

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 WingIDE.app
application bundle directory, for example /Applications/WingIDE.app/Contents/Resources).

Press OK in the NewProject dialog to create the project, then select
AddExistingDirectory 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 WingIDE.app directory).

Next navigate to bin/wing.py in the Project tool, right click on it, and
select SetAsMainDebugFile.

Finally, on OS X only you will need to open ProjectProperties from the Project
menu, select AddToinheritedenvironment 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.