Debugging MotionBuilder with Wing IDE

Categories: IDE
Comments: 2 Comments
Published on: October 30, 2010

Debugging Maya with the Wing Python IDE has been one of the greatest breakthroughs in Maya scripting/programming development in recent memory.

I first heard about this possibility from WarpCat’s blog:

My latest project requires some MotionBuilder scripting again and now that I am used to scripting like a pro w/ a real IDE and debugging, I was desperate to get Wing to connect to my MotionBuilder python process.

It turns out to be rather simple

  1. Put this file into one of your MotionBuilder python paths:
  2. Then type ‘import wingdbstub’ in your MoBu python console.
  3. Set a breakpoint in your code loaded into Wing
  4. Run your script from MotionBuilder

Voila! Wing should grab it.

*Added bonus. For autocomplete in Eclipse, you can add this line:

if False: from pyfbsdk_gen_doc import *

It turns out that there is a stub file for the pyfbsdk docs in So if you import this file, Eclipse (and other IDE’s, I presume) will reference this file for the docs for all classes and methods. The problem is that if you actually important this file, it will overwrite the functionality of the commands and they will not do anything. So by putting the ‘if False’ condition in there, when you run any of these scripts, it will not actually import the code. But Eclipse does not know any better and will still check this file for doc reference.

Post to Twitter

  1. Rig Vader says:

    Hi Jason,

    This sounds awesome – thanks for posting!

    So I followed your steps and.. well nothing 🙂 The code runs fine in MoBU, but wing does not seem to notice and evaluation is not halted at breakpoints.

    Do you know if there are any other steps I need to follow or if additional setup required?

    Much Appreciated

    • Rig Vader says:

      Enabling passive listening in Wing preferences and setting kEmbedded = 1 in was the key to making this work. All this stuff is outlined in the Maya/Wing debug post:

      Not sure if I need to enabel ‘Kill Externally Launched’ – but it seems to work both with and without.

      Thanks again – this should be super helpful!

Leave a Reply

Your email address will not be published. Required fields are marked *


Welcome , today is Wednesday, May 31, 2023