Hacker News new | ask | show | jobs
by gusfrehse 1463 days ago
Just use cerr for debugging. It is not buffered so it always outuputs, even in unexpected crashes.
1 comments

I wish it would but this is just not what I observe here, I have to flush explicitly to get things to show on the console
std::cerr being unbuffered is one of its defining features. If you're not seeing that, either you (or some dependency you use) disables it, or it's a bug in your C++ stdlib.