[wingide-users] Remote debugging

Eric Pavey warpcat at gmail.com
Tue Nov 10 16:17:08 MST 2009

On Tue, Nov 10, 2009 at 10:57 AM, Wingware Support <support at wingware.com>wrote:

> Eric Pavey wrote:
>> I'm fairly new to the whole concept of remote debugging, and I think I'm
>> encountering a "bug", so I'd like to get others thoughts on it:
>> I work in the 3D app Autodesk Maya.  It has Python as a scripting
>> language.
> ...
>  So basically, after I break out of debugging in wing, I need to restart
>> both apps before I can remote debug again.  Talking to the engineering staff
>> here, they say "that's not right", but they're not familiar enough with wing
>> or Maya to provide me with help on the subject.  Any thoughts about how to
>> make it so I don't have to constantly restart both software programs?
> Because of how Maya sets up the interpreter, be sure to set kEmbedded=1 in
> your copy of wingdbstub.py and use the debugger API to reset the debugger
> and connection as follows:
>    import wingdbstub
>    if wingdbstub.debugger != None:
>       wingdbstub.debugger.StopDebug()
>       wingdbstub.debugger.StartDebug()
> Note that in some cases you may need to add a short delay between the
> StopDebug and StartDebug calls, using something like:
>    import time; time.sleep(1)
> Please let me know whether or not this helps.

Example of new module I'm trying: (and I had set kEmbedded=1 already)

# myDebugTest.py

import time
import wingdbstub
if wingdbstub.debugger != None:
   time.sleep(1) # I tried it with and without this

def main():
    print "success"

It seems to completely disable the remote debugging now.  Maya instantly
locks up, and never comes back.  When I run the code, wing's little "bug"
icon flashes green for a split second, then goes dark again.

This is the code I execute in Maya:

import myDebugTest  # hangs on this line

When I run it, it hangs on the module import, which is when the
wingdbstub.debugger code is active.  I never even get to execute the .main()

So, next, I stop Maya's process, relaunch Maya, and retry again:  This time,
the Maya code runs, but Wing no longer picks up on it (can't seem to "hear"
it any more).  If I quit and restart Wing, the whole process repeats (Maya
locks up, no debugging, etc...)

Any thoughts?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20091110/5e1a53bd/attachment.html

More information about the wingide-users mailing list