Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 - Can't step through .NET Framework 4 source (PresentationCore.dll)

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?

like image 421
Jordan0Day Avatar asked Nov 01 '11 20:11

Jordan0Day


1 Answers

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

like image 125
Helic Avatar answered Oct 08 '22 00:10

Helic