简体   繁体   English

VS2010 - 在设计时加载符号以进行调试(不会触发断点)

[英]VS2010 - Loading symbols to debug at design time (Breakpoint will not be hit)

Issue: Breakpoint will not be hit because no symbols have been loaded 问题:因为没有加载符号,所以不会命中断点

Thanks to helpful fellow users I found out how to debug controls at design time: I have to start a 2nd instance of VS2010. 感谢有用的用户,我发现了如何在设计调试控件 :我必须启动VS2010的第二个实例。 Unfortunately, when the 2nd instance of VS2010 starts, it will load all kind of symbols, but exactly not the ones from my project. 不幸的是,当VS2010的第二个实例启动时,它将加载所有类型的符号,但不完全不是我的项目中的符号。

In the modules window, I can see that the 2nd instance of VS2010 loads different modules, but I cannot find the dlls from my project. 在模块窗口中,我可以看到VS2010的第二个实例加载了不同的模块,但我无法从我的项目中找到dll。 Unfortunately, I have no idea how I would reference them, because in the original project they are - of course - included. 不幸的是,我不知道如何引用它们,因为在原始项目中它们当然包括在内。 And from there I do start the 2nd instance when debugging. 从那里我开始调试第二个实例。

I have tried the following: 我尝试过以下方法:

  1. Set var _NT_SYMBOL_PATH 设置var _NT_SYMBOL_PATH
  2. Added the pdb files under Tools/options/Debugging/Symbols/Symbol files locations 在Tools / options / Debugging / Symbols / Symbol文件位置下添加了pdb文件
  3. Checked my dll for exclusion ( http://cantgrokwontgrok.blogspot.com/2009/10/visual-studio-unknown-build-error.html ) 检查我的dll是否排除( http://cantgrokwontgrok.blogspot.com/2009/10/visual-studio-unknown-build-error.html

Any idea how to tackle this issue? 知道如何解决这个问题吗?

I have fought that battle quite a few times, so here's some things you might want to check: 我已经打了很多次这场战斗,所以这里有一些你可能要检查的事情:

  • PDB files must be in the same location the dll is loaded from PDB文件必须位于加载dll的相同位置
  • Use Fusion to see where the Visual Studio Designer picks up your dll from, make sure you have a PDB there 使用Fusion查看Visual Studio Designer从中获取dll的位置,确保在那里有PDB
  • Check if your PDB matches your dll 检查您的PDB是否与您的dll匹配

Have you tried to manually load the symbols in the debugging instance? 您是否尝试在调试实例中手动加载符号? (Right-click in the Modules window, point to Load Symbols From). (在“模块”窗口中单击鼠标右键,指向“从中加载符号”)。

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

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