2

I'm trying to debug some of the examples provided in the Maya API SDK.

Building the DLL with Visual Studio 2010 in debug mode worked fine, and the plugin, once loaded into Maya, worked fine. However after attaching, Visual Studio complains about cannot find or open the PDB file. I ignored those warning and set some break points, but clearly VS does not break.


Regarding building plugins and debugging by attaching them to Maya, I've read:

On SE, I have read the following suggestions:


In particular, I tried:

  • making sure that the plugin that I am loading into Maya is the one that I just built;
  • verifying that the PDB has the same name, is in the same folder, has been created at the same time than the DLL;
  • loading manually the PDB ("A matching symbol was not found");
  • activating the Symbol Server in VS (fine, but I got only the Microsoft ones obviously)
Community
  • 1
  • 1
Hugues Fontenelle
  • 5,275
  • 2
  • 29
  • 44
  • Can you update your question to explain how you 'loading manually the PDB' as I would have expected this to fix your problem. – Mike C. Jun 21 '13 at 14:54
  • Right-click on the myplugin.mll in Module View > Load Symbols from > Symbol Path > myplugin.pdb – Hugues Fontenelle Jun 26 '13 at 09:12
  • possible duplicate of [PDB does not match image Error](http://stackoverflow.com/questions/7749558/pdb-does-not-match-image-error) – Hugues Fontenelle Jun 27 '13 at 22:28
  • I'm voting my own question as a duplicate of http://stackoverflow.com/questions/7749558/pdb-does-not-match-image-error . The answer: change the 'Program Database File name' to "inherit from parent or project default" worked for me. (But for some reason not the first time around, but restarting helped). – Hugues Fontenelle Jun 27 '13 at 22:30

1 Answers1

1

Usually, putting the pdb in the same folder will always work - however, the times where this doesn't is usually because your dll is being loaded from elsewhere in the path and its not actually running the dll you think it is (at least, that's what happens to me).

Once your app is running, try and delete the dll - if you can, its not loaded. Or you can look at the path in the modules window in VS. That will also give a clue to why its not loaded and give you the option to manually load symbols from anywhere on disk.

gbjbaanb
  • 51,617
  • 12
  • 104
  • 148
  • The action cannot be completed because the file is open in Maya (therefore the right plugin is loaded in the application). I checked the module view in VS: same path, same dll (therefore the right dll is loaded into the debugger). – Hugues Fontenelle Jun 26 '13 at 09:16