c - printf before assert doesn't work -


i think i've seen issue before , bet there's better solution out there asking..

during debugging found printf before assert don't work well. they're not printed of time. tried adding fflush(stdout) doesn't seem help.

any other thoughts or alternatives?

example:

printf... <- not printed printf... <- not printed due assert. stdout not flushed?   assert() 

call fflush(stdout) before assert. or, if stdout has not been redirected , refers terminal, writing newline @ end of message should sufficient. default, stdout buffered (line buffered on terminals; buffered otherwise) , output not written until output buffer overflows or newline (in line-buffered mode) or fflush encountered.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -