Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Visual Studio 2013 Cookbook

You're reading from   Visual Studio 2013 Cookbook Understanding the latest features of Visual Studio can speed up and streamline your projects. And there's no better learning tool than this collection of focused recipes that gives you the fast, hands-on experience you need.

Arrow left icon
Product type Paperback
Published in Mar 2014
Publisher Packt
ISBN-13 9781782171966
Length 332 pages
Edition Edition
Languages
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Visual Studio 2013 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Discovering Visual Studio 2013 FREE CHAPTER 2. Getting Started with Windows Store Applications 3. Web Development – ASP.NET, HTML5, CSS, and JavaScript 4. .NET Framework 4.5.1 Development 5. Debugging Your .NET Application 6. Asynchrony in .NET 7. Unwrapping C++ Development 8. Working with Team Foundation Server 2013 9. Languages Visual Studio Medley Index

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 following steps:

  1. Use the following code to populate the body of Program.cs. It's a pretty simple program that starts a parallel for loop, which in turn calls a method that performs meaningless calculations intended to keep the CPU busy.

    class Program...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime