When debugging multi threaded .NET apps in VS (2008) I frequently want to step through code. When I press F10 quite often I find VS jumping to a statement in another thread. Its really confusing and always throws me off.
I can work around it by chucking in a million breakpoints.
Is there a cleaner way of asking VS debugger to go to the next statement in the current thread?
John Robbins, an authority on Windows debugging, just posted a macro that allows you to freeze and thaw threads in bulk in VS 2008.
This certainly makes things much easier. Thread inter-dependencies may end up causing issues, nonetheless this is a workable solution most of the time.