Debugging Tasks

Visual Studio 2015 allows you to collect information about asynchronous tasks with the Tasks window. This is not a new tool; it has been available since Visual Studio 2012, but only for the Task Parallel Library. It now provides support for the Async/Await pattern in Visual Studio 2013 and requires Windows 8 or higher. To understand how it works, place a breakpoint on the QueryVideosAsync method in the sample WPF application and press F5. When the breakpoint is hit, select Debug, Windows, Tasks and press F11 to step into the code. As you step into asynchronous method calls, the Tasks window shows information on each task, as shown in Figure 42.8.

FIGURE 42.8 The Tasks window.

As you can see, the Tasks window shows what task ...

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.