我正在尝试创建一个 Visual Studio 集成包项目,它将显示来自调试器的数据。
所以我找到了 EnvDTE 命名空间,它看起来为我提供了所需的类和方法。
根据 VS2005 的文档,应使用以下代码来获取调试器的实例:
EnvDTE.Debugger _debugger;
_debugger = EnvDTE.DTE.Debugger;
但这会在 VS2010 中生成错误 - 非静态字段、方法或属性“EnvDTE._DTE”需要对象引用。 Debugger.get'
如何在 VS2010 中询问调试器?
提前致谢。
I'm trying to create a Visual Studio Integration Package project which will display data from the debugger.
So I found the EnvDTE namespace, that looks to give me the needed classes and methods.
According to the documentation for VS2005, the following code should be used to get an instance of the debugger:
EnvDTE.Debugger _debugger;
_debugger = EnvDTE.DTE.Debugger;
But this generates an error in VS2010 - An object reference is required for the non-static field, method, or property 'EnvDTE._DTE.Debugger.get'
How can I interrogate the debugger in VS2010?
Thanks in advance.
发布评论
评论(2)
要从 VS 包访问 DTE 的调试器,请调用 GetService 在您的
Package
对象上,如下所示:To access DTE's debugger from a VS Package, call GetService on your
Package
object, as in:也许更好的方法是创建调试器可视化工具,看看 Mole AFAIK,它是迄今为止最有能力的调试器可视化工具,并且对于旧版本源可用
http://karlshifflett.wordpress.com/mole-2010/mole-for-visual-studio/
Maybe better way would be create Debugger visualizer, look at the Mole AFAIK it's by far most capable debugger visualizer and for old version source is available
http://karlshifflett.wordpress.com/mole-2010/mole-for-visual-studio/