Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to have other threads continue to run when one thread freeze due to breakpoint

my understanding about debugging process and debuggers is that when a breakpoint gets hit, all other threads gets frozen. However one of my colleague said that this option is configurable meaning that somewhere in Visual Studio options you can configure that other threads (where there is no breakpoint) continue to work as normal although the thread with breakpoint get frozen. I couldn't find any such settings in visual studio plus my colleague does not remember where he saw that setting although he seem pretty confident that this option exists.

Can someone confirm if its even possible to have other threads running while one thread gets frozen due to breakpoint? Also if there is such a setting, please let me know where to find it.

like image 849
crazy novice Avatar asked Aug 07 '14 13:08

crazy novice


People also ask

What is Freeze thread?

Creators will soon be able to freeze comment threads on their works using the "Freeze Thread" button. Freezing a thread prevents new replies from being added to a comment or to any of its replies. It also prevents comments in the thread from being edited.

How do I view threads in Visual Studio?

While Visual Studio is in debug mode, select the Debug menu, point to Windows, and then select Threads.


1 Answers

The debugger always freezes all threads when a breakpoint hits. You have however do have control over what happens to threads when you press F5 to continue execution. You can use the Freeze toolbar button available in the Debug + Windows + Threads debugger window to prevent a thread from continuing when you press F5. Use the Thaw button to re-enable it.

like image 140
Hans Passant Avatar answered Nov 10 '22 17:11

Hans Passant