首页 文章

Visual Studio 2010 - 无法单步执行.NET Framework 4源代码(PresentationCore.dll)

提问于
浏览
8

The problem: 我'm getting a nullref inside of System.Windows.Interop.HwndKeyboardInputProvider'的FilterMessage方法,我'd really like to try to debug, but without being able to step through the source I'我不知道还能做什么 .

I've tried 设置Visual Studio 2010以允许我逐步完成.NET Framework源代码(特别是System.Windows.Interop.HwndKeyboardInputProvider 's FilterMessage method, in PresentationCore.dll). I' m,无法让我的visual studio显示.NET源代码进行调试 . 我已经尝试过:

在VS2010选项 - >调试菜单中,按照此处的说明启用"Enable .NET Framework source stepping",启用"Enable source server support",禁用"Require source files to exactly match the original version" :( http://blogs.microsoft.co.il/blogs/arik/archive/2010/07/12/step-into-net-framework-4-0-source-code.aspx)并安装参考源并设置VS以使用参考源附带的符号文件以及其他几个尝试基于在线文章/博客条目 . 使用该方法,我可以在我的模块窗口中看到正在加载PresentationCore.dll的符号,但是当我尝试进入我正在尝试调试的区域时,我仍然得到"No source available"窗口 .

模块窗口显示从我安装.NET 4参考源的路径加载符号:
enter image description here

调用堆栈显示我似乎应该能够进入PresentationCore.dll的System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage方法:
enter image description here

"No Source Available"窗口,"Browse to Find Source"已禁用:
enter image description here

我不确定还能尝试什么?

1 回答

  • 2

    一个可能的原因是确保.Net汇编与项目中设置的版本相同 . 我遇到了同样的问题,因为项目中的.Net设置为3.5,源代码设置为4.5

相关问题