8
votes

The problem: I'm getting a nullref inside of System.Windows.Interop.HwndKeyboardInputProvider's FilterMessage method that I'd really like to try to debug, but without being able to step through the source I'm not sure what else to do.

I've tried Setting up Visual Studio 2010 to allow me to step through the .NET Framework source (specifically System.Windows.Interop.HwndKeyboardInputProvider's FilterMessage method, in PresentationCore.dll). I'm having trouble getting my visual studio to display .NET source for debugging. I've followed various different articles/blog entires, but nothing seems to be working. What I've tried:

In the VS2010 Options->Debugging menu, enabling "Enable .NET Framework source stepping", enaling "Enable source server support", disabling "Require source files to exactly match the original version", following the instructions here: (http://blogs.microsoft.co.il/blogs/arik/archive/2010/07/12/step-into-net-framework-4-0-source-code.aspx) and installing the reference source and setting up VS to use the symbol files included with the reference source, along with several other attempts based on articles/blog entries online. Using that method, I can see in my modules window that the symbols for PresentationCore.dll are being loaded, but I still get the "No source available" window when trying to step into the area I'm trying to debug.

Modules window showing that Symbols are being loaded from the path where I installed the .NET 4 reference source: enter image description here

Call stack showing that it seems like I should be able to step into PresentationCore.dll's System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage method: enter image description here

The "No Source Available" window, with "Browse to Find Source" disabled: enter image description here

I'm not really sure what else to try?

1
Have you unchecked "Enable Just My Code"? - Ilian
Yes, "Just My Code" is disabled (it is mutually exclusive with "Enable .NET Framework Source Stepping"). - Jordan0Day
Look through your Windows Update history and check if you recently got a .NET 4 security update. It takes a while for them to update the source server. - Hans Passant
@HansPassant, ugh, I was afraid the problem might be somehow related to framework updates. My most recent .NET update seems to be from July, so hopefully the source server is more up-to-date than that :( - Jordan0Day
Odd, there was one last week. I dunno, I never have had any luck with it either. - Hans Passant

1 Answers

2
votes

One possible reason is make sure the .Net assemble is as the same version as set in the project. I had the same problem, because the .Net in project was set to 3.5 and the source code was in 4.5