I've noticed if I do a dbgprintf and then an assert(false), sometimes the debug message isn't printed before the program dies. I'm not sure why. Compiler optimization? Stream not getting flushed?
I would appreciate it if there was a function like
dbgassert(bool, const char* _format, ...)
where I could add a nice debugging message for why the assertion failed (similar to LOG(FATAL) or CHECK() at Google), and also log the component info like dbgprintf() does.