Visual Studio, debug one of multiple threads

Oskar Kjellin picture Oskar Kjellin · Oct 10, 2010 · Viewed 48.6k times · Source

I have an application with 4 threads working the same code. However, when I step it jumps between the different threads. How can I lock it to one thread so the other threads are ignored for debugging?

Answer

i_am_jorf picture i_am_jorf · Oct 10, 2010

Yes.

In the Threads window (Debug -> Windows -> Threads) right-click the thread you want and select "switch to thread".

You can also choose "freeze" on the threads you don't want to debug in order to keep them from running. Don't forget to "thaw" them if you expect them to do work, however.

Further reading.