Reputation: 5507
I have a List<Student>
that contains lets say 500 students. When I enter debug mode on a breakpoint is there a way to filter/search for a student?
I don't want to write code for this check as below:
List<Student> students = data.GetStudents();
//break here and filter for student in debug mode
var myStudent = students.Where(k=>k.StudentNumber=="S12312");
Is it is not possible in Visual Studio 2013 to do this, I think it would be a great feature to add...
Upvotes: 6
Views: 5562
Reputation: 14700
You can use a 3rd party debugging tool called OzCode (disclaimer: I work for the company that makes it, though I don't work on the product myself).
It extends the QuickWatch debug window to allow searching within the object, looking for strings and values in all the object's properties. It's not a full lambda, but it lets you run a search several levels deep to find a value:
Upvotes: 2
Reputation:
You must install VS 2015 http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/support-for-debugging-lambda-expressions-with-visual-studio-2015.aspx
Old versions does not support this.
Upvotes: 2
Reputation: 176896
Read this post debugging feature is now supported by visual studio 2015: http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/support-for-debugging-lambda-expressions-with-visual-studio-2015.aspx
Check debugging option as per this image : http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-45-92-metablogapi/0882.image_5F00_thumb_5F00_13C96B25.png
Upvotes: 7