I'm debugging C++ program compiled with MSVC under Windows. I want to investigate issue linked with multi threading. So I put ASSERT in my code and when program reaches ASSERT it displays window about ASSERT (Standart [Abort], [Retry], [Ignore] window) with proposal to pause program in debugger. I press [Retry] button and program pauses. BUT while I was pressing the button other threads continue to execute. So the question is how to immediately stop the program when it reaches some point to see what other threads was doing at that time?
You can press the Pause button in the debug toolbar (or hit ^⌘Y/Alt+Ctrl+Break or choose "Debug|Pause from the menu).
F11 -> Execute code one statement at a time, following execution into function calls (Step Into).
Right-click the breakpoint symbol and select Conditions (or press Alt + F9, C). Or hover over the breakpoint symbol, select the Settings icon, and then select Conditions in the Breakpoint Settings window.
You might want to set a conditional breakpoint instead of using an assert
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With