Debugging parallel code

With the prevalence of multi-core CPUs, we are seeing more and more applications taking advantage of parallel processing to improve performance. .NET Framework 4.0 added a number of features such as Task Parallel Library (TPL) and Parallel LINQ (PLINQ) to make the development of applications that take advantage of multi-core CPUs much simpler.

The debugging experience for threaded applications in Visual Studio has got better with each release, and VS2013 is no exception. Let's take a look at what is available.

Getting ready

Start a premium edition Visual Studio 2013 and create a new C# console application. For this recipe, call the application ParallelDebugging.

How to do it…

In order to debug the parallel code, perform the ...

Get Visual Studio 2013 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.