2

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:

How can I step into Microsoft's .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/

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.

Community
  • 1
  • 1
Sean Sobey
  • 942
  • 7
  • 13
  • .NET 4.6.2 is still not GDR, should happen soon. Use the troubleshooting procedure shown in [this post](http://stackoverflow.com/a/27655501/17034) to get a fact instead of a guess. – Hans Passant Feb 03 '17 at 13:19

1 Answers1

0

Your troubles might be caused by the nature of LINQ itself.

Debugging LINQ has some major restrictions: https://msdn.microsoft.com/en-us/library/bb385795.aspx

For example:

LINQ to SQL

When you are debugging LINQ code, stepping has some behavioral differences you should know about.

In LINQ to SQL queries, the predicate code is beyond the control of the debugger. 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.

Jens H
  • 4,590
  • 2
  • 25
  • 35
  • Hmm quite possible, but surely that would not cause the module to be unable to load? Also I am trying to step into Enumerable.Contains, which doesn't take a predicate (or any delegate). – Sean Sobey Feb 03 '17 at 10:10