Using Wing with Source Filmmaker

Index of All Documentation » How-Tos » How-Tos for Modeling, Rendering, and Compositing Systems »

Wing Pro Screenshot

Wing Pro is a Python IDE that can be used to develop, test, and debug Python code written for Source Filmmaker (SFM), a movie-making tool built by Valve using the Source game engine.

If you do not already have Wing Pro installed, download it now.

This document describes how to configure Wing for Source Filmmaker. To get started using Wing as your Python IDE, please refer to the tutorial in Wing's Help menu or read the Quickstart Guide.

Debugging Setup

Wing can debug Python code that's saved in a file, but not code entered in the Script Editor window. As of version (released May 2014), this includes scripts run from the main menu. In all versions, code in imported modules may be debugged.

When debugging Python code running under SFM, the debug process is initiated from outside of Wing, and must connect to the IDE. This is done with wingdbstub, as described in in the Debugging Externally Launched Code section of the manual. Because of how SFM sets up the interpreter, you must set kEmbedded=1 in your copy of

Some versions of SFM comes with in the site-packages directory in its Python installation. However, this file must match the version of Wing you are using so you may need to copy from your Wing install directory to the site-packages directory. The default location of the site-packages directory is:


Before debugging, click on the bug icon in lower left of Wing's window and make sure that Accept Debug Connections is checked. After that, you should be able to reach breakpoints by causing the scripts to be invoked from SFM.

To start debugging and ensure there's a connection from the SFM script being debugged to Wing, execute the following before any other code executes:

import wingdbstub

To use the python executable found in the SFM application directory to run Wing's Python Shell tool and to debug standalone Python scripts, enter the full path of the python.exe file under Command Line in the Python Executable field of the Project Properties dialog <script:view_project_properties#highlighted_attrib="proj.pyexec">`__.

Related Documents

For more information see: