celu at February 19th, 2007 11:36 — #1
Hi I have been developing a plugin for maya.I want to know how to debug my plugin? When i start the debugger it asks me for a target application.I tried setting the target application as maya,But I get the following error.
"Debugging information for 'maya.exe' cannot be found or does not match.No symbols loaded."
I feel lost.It would be really gr8 if someone could point out the correct way to setup the debugger so that I could step through my plugin, just as i would for a normal application.
hovermonkey at February 19th, 2007 11:51 — #2
Ignore the warning and stick a breakpoint at the entry point of your plugin DLL; it should still stop at the breakpoint once the program loads and starts it. Obviously make sure your DLL is compiled and linked with the right debug information etc.
kenneth_gorking at February 19th, 2007 16:43 — #3
It will stop at the breakpoint, I used to debug plugins for 3dsmax that way. It worked fine, except for all the debug info it spit out, it slowed it down a bit.
celu at February 19th, 2007 22:02 — #4
When I set a break point, and start the debugger in my visual studio, the 'maya.exe' is automatically started.But once maya loads I get the following error message.
"Windows has trigered a break point in maya.exe. This may be due to a currption of the heap and indicates a bug in maya.exe or any of the DLLs it has loaded."
Im relativley new to working with plugins.So im pretty clueless as to wats causing this problem.Once I setup the debugger properly,I would be able to pick it up from there.
I will list out wat i did so far.So you can guide me better.
1)I have compiled and built my foo.mll maya plugin.
(my plugin is a simple command plugin that displays the CVs of the selected object on the maya output window)
2)I copied my plugin into the plugins folder of maya.
(I tested my plugin in maya and its working fine.)
3)Now when I try to run my plugin code in debugging mode(F5),I get the following warning,
Debugging information for 'maya.exe' cannot be found or does not match.No symbols loaded.
when i give continue.the debugger starts 'maya.exe' but as soon as maya loads,I get the following error message.
Windows has trigered a break point in maya.exe. This may be due to a currption of the heap and indicates a bug in maya.exe or any of the DLLs it has loaded.
(This is irrespective of Whether or not I have a break point set in my plugin code or not)
any pointers as to what might be going wrong or about how to find out wats going wrong would be really helpful.
kenneth_gorking at February 20th, 2007 05:05 — #5
Have you tried to just continue execution (F5 again)? If maya can start without a debugger attached, I'm sure it can start with one attached. Otherwise if you can see what dll is the culprit, then try and disable it (if it is just a plugin). When I was debugging for 3dsmax I got some exceptions from one the dlls, but I was able to continue without problems.
pater at February 20th, 2007 16:20 — #6
If maya can start without a debugger attached, I'm sure it can start with one attached.
That is not always true. Some programs use methods to prevent debugging (the simplest one is to use IsDebuggerPresent() of the Windows API).
There are even programs (i.e. Google Desktop with the Sidebar(!)) which are really intended for plugins, that use such methods, which makes it quite hard to develop a plugin.
nick at February 20th, 2007 17:33 — #7
Start Maya, then go to 'Debug > Attach to Process', and select Maya. This way you can skip much of the exceptions and debug checking stuff at the startup. Also in 'Debug > Exceptions' you can select what exceptions you want to break on.
celu at February 21st, 2007 03:24 — #8
thx guys now its working i started maya,loaded my plugin and then used attach to process in visual studio and its working! thx!