views:

193

answers:

1

Hi all: I'm using VS2010 Beta 2 to debug some multi-threaded code. Love parallel stacks, etc.

I have a question, though: I have a breakpoint set in a method that may be called by multiple threads. Once I hit the breakpoint, I really want to keep the focus on the thread that triggered the that breakpoint. However, when I hit "step", VS often switches to another thread (say I'm stopped on thread 1, but in the meanwhile, thread 2 hits my breakpoint).

I know that I can manually freeze threads in the thread window. Is there a way to do it automatically -- basically, once I hit a breakpoint, freeze all threads except the current one until I hit F-5?

+1  A: 

Not that I'm aware of, however you could disable your breakpoint while you are stepping through.

When I'm worried about confusing many threads I tend to just keep the threads window open and keep a note of the thread id's.

Kragen