Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Debug in only one thread

I use VS2017 to debug my C++ app. However, when I utilize single-step debug, it will switch to some thread automatically and I only want to debug one specific thread. How could I go about doing this?

like image 373
Gordon Avatar asked Dec 30 '25 23:12

Gordon


1 Answers

Breakpoints

You can configure VS2017 debugger to filter only a specific thread. Follow this msdn blog to apply one to a breakpoint. You want to filter on ThreadId.


Thread Window

Another way is through the Threads Window. Here you can view all active threads in the application.

  1. Debug > Windows > Threads
  2. Right click desired thread
  3. Click switch to thread
like image 124
Impurity Avatar answered Jan 01 '26 13:01

Impurity