views:

49

answers:

2

Hello. Is it possible to break a single thread in Visual Studio, while other threads will continue their execution?

I have one background thread that does simple data sending/receiving, which I would like to happen, while stepping through my code in some other thread.

+2  A: 

open the thread view (Debug->Windows->Threads), right-click the thread you want to suspend, select 'Freeze'. Select 'Thaw' to put it back in a running state.

stijn
Thread window is inactive while the program is running. And 'Thaw' does not really put it into running state, it just means that this thread will run (among others) after I'll release a program from breakpoint. What I want to do is to step through one thread, while others run in background.
Eugene Kulabuhov
I see. As others pointed out, don't think that can be done in the IDE. You could simultae it by pulling out that thread from the code and running it as a seperate process. Not easy though if it has to communicate a lot with the other threads. Your best bet is extensive logging.
stijn
A: 

All i can find to this, is that you can change the behaviour on a process level by the setting

  • Tools - Options - Debugging - General - Break all processes when one process breaks

but not on a Thread base.

Oliver