简体   繁体   English

VS2010调试附加到进程/无法找到或打开PDB文件

[英]VS2010 Debug attach to process / cannot find or open the PDB file

I'm trying to debug some of the examples provided in the Maya API SDK. 我正在尝试调试Maya API SDK中提供的一些示例。

Building the DLL with Visual Studio 2010 in debug mode worked fine, and the plugin, once loaded into Maya, worked fine. 使用Visual Studio 2010在调试模式下构建DLL可以正常工作,并且插件一旦加载到Maya中,就可以正常工作。 However after attaching, Visual Studio complains about cannot find or open the PDB file . 但是,附加后,Visual Studio抱怨找不到或打开PDB文件 I ignored those warning and set some break points, but clearly VS does not break. 我忽略了这些警告,并设置了一些断点,但显然VS不会中断。


Regarding building plugins and debugging by attaching them to Maya, I've read: 关于构建插件和通过将其附加到Maya进行调试,我已阅读:

On SE, I have read the following suggestions: 在SE上,我已阅读以下建议:


In particular, I tried: 我特别尝试过:

  • making sure that the plugin that I am loading into Maya is the one that I just built; 确保要加载到Maya中的插件是我刚刚构建的插件;
  • verifying that the PDB has the same name, is in the same folder, has been created at the same time than the DLL; 验证与DLL在同一时间创建的PDB具有相同的名称,位于相同的文件夹中;
  • loading manually the PDB ("A matching symbol was not found"); 手动加载PDB(“找不到匹配的符号”);
  • activating the Symbol Server in VS (fine, but I got only the Microsoft ones obviously) 在VS中激活Symbol Server(很好,但是我显然只有Microsoft的)

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). 通常,将pdb放在同一文件夹中总是可以的-但是,这种情况通常不起作用的原因通常是因为您的dll是从路径中的其他位置加载的,并且实际上并未运行您认为是的dll(至少,这就是我发生的事情)。

Once your app is running, try and delete the dll - if you can, its not loaded. 应用运行后,请尝试删除该dll-如果可以,则不加载该dll。 Or you can look at the path in the modules window in VS. 或者,您可以在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. 这也将提供一个提示为什么不加载它的线索,并为您提供从磁盘上任何位置手动加载符号的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM