I am able to run my multithreaded C++ application in CLion debug. However, it is virtually useless with the call stack jumping between threads each time I step to the next instruction. After about 3 jumps I lose track of what thread is where. And having to select the thread from a pull down is too awkward.
It seems like there should be a way to monitor each thread separately. There is a feature in other JetBrains products called "Parallel Stacks" that seems to address that. But I don't see it in CLion (2018.2.5).
Ideally, one could force the IDE to stay on (and step through) one thread while the others are running in the background. If a breakpoint is hit in another thread, a separate call stack should appear indicating it stopped, but the source code display would stay at the thread being monitored.
Is there some way to achieve something like this, or another scheme to allow debugging a multithreaded app efficiently and effectively?
I encountered the same issue when debugging application built with MSVC using lldb in CLion. I found a partial solution by using lldb command in the debug console (for instance thread step-over
). I guess you could apply the same logic if you are using gdb.
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