Out Of Context Variables In Visual Studio 2010 Debugger

后端 未结 1 499
挽巷
挽巷 2020-12-18 20:11

I am having a very odd problem with local variables being out of context in the Visual Studio 2010 debugger for a C# console application targeting .NET 4.0. I\'ve searched f

相关标签:
1条回答
  • 2020-12-18 20:26

    So it turns out this is related to a bug in PostSharp. I had been using PostSharp but removed all aspects from my code and ensured that none were applied. I also verified with Reflector that the methods were intact in the assembly. However, it appears simply referencing PostSharp triggers some kind of manipulation of the debugging symbols that causes this problem. A (little) more information can be found here:

    http://www.sharpcrafters.com/forum/Topic5794-21-1.aspx#bm7927

    Also, in the release notes for the latest PostSharp hotfix states one of the fixed issues in hotfix 2.1.5.6 is "Debugging symbols: local variable symbols lost in implicit iterators."

    When I installed the latest and greatest PostSharp the problem went away and the universe returned to normal. Hopefully this question/answer will help anyone else using PostSharp who stumbles on this odd behavior before the next official PostSharp release. Make sure you're on hotfix 2.1.5.6 or greater (given the severity of the bug, this probably should have been an actual release).

    Thanks for all the help everyone.

    0 讨论(0)
提交回复
热议问题