Debugging multiple threads

Debugging multiple threads in Visual Studio is tricky, especially since these threads are all running at the same time. Luckily, we have a few tools available to us as developers to use to get a better understanding of what is happening in our multithreaded applications.

Getting ready

While debugging multithreaded applications, you can access various windows by going to Debug | Windows in Visual Studio.

How to do it…

  1. Start debugging your multithreaded application after adding a breakpoint somewhere in the code. You can access various debugging windows by going to Debug | Windows in Visual Studio:
    How to do it…
  2. The first window available ...

Get C# Programming Cookbook now with O’Reilly online learning.

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