Debugging Maya Plugin with Xcode

白昼怎懂夜的黑 提交于 2021-01-27 18:40:29

问题


I am trying to debug my Maya plugin that I build for Maya 2013 using Xcode 4.6.3 debugging features. I want to be able to set a breakpoint and trace through the plugin but I am not able to set Xcode up for Maya debugging. In the Edit Scheme section, I set the executable to Maya.app but that results in the following output in my Console window:

Flags:
-v                       prints the product version and cut number
-batch                   for batch mode
-prompt                  for interactive non-gui mode
-proj [dir]              look for files in the specified project dir
-command [mel command]   runs the specified command on startup
-file [file]             opens the specified file
-script [file]           sources the specified file on startup
                         (use complete file name)
-recover                 recover the last journal file
                         (use 'Render -help' for more options)
-optimizeRender [file] [outfile]
                     optimize maya file efficient for rendering
                         purposes, and put result in outfile
                         (use 'maya -optimizeRender -help' for more options)
-archive [file]          displays a list of files required to archive
                         the specified scene.
-noAutoloadPlugins       do not auto-load any plug-ins.
-3                       enable Python 3000 compatibility warnings
-help                    prints this message

I have set the build configuration to 'Debug'. The only known link that was helpful was this but now its severely outdated.

Could anyone please help me in setting Xcode up for Maya debugging?


回答1:


This link provides a very good explanation for debugging Maya plugins in Visual Studio. The same process can be applied to Xcode.

Link :- https://alliance.seas.upenn.edu/~cis660/wiki/index.php?title=Debug_CPP_Plugin




回答2:


I had same problem, but then I set the executable to the actual executable inside the app package and it launched properly for me.

Eg for Maya 2016 set launch app to: /Applications/Autodesk/maya2016/Maya.app/Contents/MacOS/Maya

The main reason I prefer this method over attachment method is that it gives you full control over the launch environment and you can easily set environment variables for the debug session (which are otherwise a HUGE pain to set in OS X)

NB It's hard to browse to from xcode browse dialog into an app package but you can drag the file from a normal Finder window directly onto the browse dialog to get to this otherwise inaccessible path



来源:https://stackoverflow.com/questions/18661153/debugging-maya-plugin-with-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!