Search code examples
c#linqvisual-studiovisual-studio-2015watch-window

VS2015 LINQ in debugger watch window


According to my source Debugging lamba expression with VS2015, LINQ should work in the debugger's watch window. However, I still receive the following error:

error CS1061: 'IEnumerable<MyClass>' does not contain a definition for 'Where' and no extension method 'Where' accepting a first argument of type 'IEnumerable<MyClass>' could be found (are you missing a using directive or an assembly reference?)

Do I have to turn some option on? How to enable LINQ in the watch window? System.Linq is included via using in the file I'm currently debugging.


Solution

  • I have found the problem: Mono.Cecil-rewritten assemblies do not support extension method evaluation in the debugger (including LINQ extension methods) at the moment. I will extend this answer as soon as I have a workaround.

    Here is the link to the Mono.Cecil GitHub issue: https://github.com/jbevain/cecil/issues/90