Debugging Lambda Expressions

The Visual Studio 2015 IDE introduces support for using lambda expressions in the Watch and Immediate windows; the developer community has been asking for this for many years. Now you can actually debug both lambdas and LINQ queries, and in this chapter you see how to debug a lambda and then, in other chapters in Part IV, you see how to debug a query; you’ll notice that debugging works the same in many cases. To understand how this new feature works, consider the following method, which simply creates a list of some first names, of type String:

Sub GenerateStrings()    Dim myList As New List(Of String) From {"Alessandro", "Antonio", "Diego",        "Renato"}End Sub

Say that you want to ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.