Friday, April 10, 2015

How to debug a single thread in Visual Studio?

http://stackoverflow.com/questions/5304752/how-to-debug-a-single-thread-in-visual-studio

Freeze/Thaw threads is an incorrect way because other threads don't execute any code.
The most correct and usable way is to:
  1. Hit Ctrl+A in the breakpoints window (select all breakpoints).
  2. Right click and select "Filter...".
  3. Enter "ThreadId=(current thread id)".
So all threads are executed, but the debugger hits on the current thread only.

No comments:

Post a Comment