简体   繁体   中英

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: 在此处输入图片说明

Call stack showing that it seems like I should be able to step into PresentationCore.dll's System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage method: 在此处输入图片说明

The "No Source Available" window, with "Browse to Find Source" disabled: 在此处输入图片说明

I'm not really sure what else to try?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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