If you are debugging something concurrent, consider using shims/libraries that model the concurrency model explicitly (then they have the concept of a trace *and* have support for searching the space of traces). For Rust, take a look at loom (https://docs.rs/loom/latest/loom/). For C++, take a look at relacy race detector (https://www.1024cores.net/home/relacy-race-detector).
That said, using these requires some amount of adaptation of the code being tested, so it makes sense ~only if you have a well-separated concurrent data structure that you suspect misbehaves.