Hey,

Don't know if you've figured this out yet, but all you need to do is put 
your script in a file on the disk in the maya script path. Then import the 
file/module from the maya console and attach the debugger. You will see the 
source inside winpdb.




On Friday, June 22, 2012 4:55:52 PM UTC-7, doogster wrote:
>
> Are there any Winpdb users here? It's a Python debugger that supports 
> embedded debugging, and thus should be suitable for use on Python code 
> running in Maya.
>
> Details on that capability are here:
> http://winpdb.org/docs/embedded-debugging/ 
>
> However, I've had trouble getting it to work. If I execute the following 
> code in Maya's Python editor:
>
>     import rpdb2
>     rpdb2.start_embedded_debugger('blargh')
>     print 'a'
>
> And then I launch Winpdb and "attach" to it, then I see an attachment 
> point whose "Filename" field reads "<maya console>".
>
> I selecting the "<maya console>" and click "Okay".
>
> This causes the "Source <maya console>" window to display the following 
> output:
>
> "Failed to load source file '<maya console>' from debuggee. You may 
> continue to debug, but you will not see  source lines from this file."
>
> According to Autodesk, "this is because the code which is in the Maya 
> Script Editor has no physical file", as you can read here:
>
>
> http://autodeskcatalog.com/mediaentertainment/files/2012/04/debugging_python_in_maya.pdf
>  
>
> How does one get around that, and use Winpdb to debug Python code running 
> in Maya?
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to