Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
gusfrehse
· 4y ago · 0 comments
Just use cerr for debugging. It is not buffered so it always outuputs, even in unexpected crashes.
Comments
[–]
jcelerier
4y ago
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
[–]
int_19h
4y ago
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.