简体   繁体   English

System.Linq的Visual Studio .Net源代码步进

[英]Visual Studio .Net source stepping for System.Linq

I am trying to step through some of the .Net source in System.Linq (specifically System.Linq.Enumerable.cs) and have followed a few existing guides for stepping through .Net source: 我正在尝试逐步浏览System.Linq(特别是System.Linq.Enumerable.cs)中的某些.Net源代码,并按照一些现有的指南来逐步了解.Net源代码:

How can I step into Microsoft's .NET framework source code? 如何进入Microsoft的.NET Framework源代码?

https://blogs.msdn.microsoft.com/sburke/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code/ https://blogs.msdn.microsoft.com/sburke/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code/

https://blogs.msdn.microsoft.com/mcsuksoldev/2010/09/09/debugging-the-net-framework-source-code/ https://blogs.msdn.microsoft.com/mcsuksoldev/2010/09/09/debugging-the-net-framework-source-code/

But so far nothing is working. 但是到目前为止,没有任何效果。 I have disabled 'Just My Code' and enabled '.Net source stepping' in VS 2015. Its shows modules loaded for mscorelib.dll and System.Core.dll but System.Linq.dll is unable to load symbols. 我在VS 2015中禁用了“仅我的代码”并启用了“ .Net源代码步进”。它显示了为mscorelib.dll和System.Core.dll加载的模块,但System.Linq.dll无法加载符号。

Your troubles might be caused by the nature of LINQ itself. LINQ本身的性质可能会引起您的麻烦。

Debugging LINQ has some major restrictions: https://msdn.microsoft.com/en-us/library/bb385795.aspx 调试LINQ有一些主要限制: https : //msdn.microsoft.com/zh-cn/library/bb385795.aspx

For example: 例如:

LINQ to SQL LINQ转SQL

When you are debugging LINQ code, stepping has some behavioral differences you should know about. 在调试LINQ代码时,单步执行会有一些行为上的差异,您应该了解这些差异。

In LINQ to SQL queries, the predicate code is beyond the control of the debugger. 在LINQ to SQL查询中,谓词代码超出调试器的控制范围。 Therefore, you cannot step into the predicate code. 因此,您不能进入谓词代码。 Any query that compiles to an expression tree produces code that is beyond the control of the debugger. 任何编译为表达式树的查询都将产生调试器无法控制的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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