Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse cygwin printf no output on debug

I managed to get cygwin to work with eclipse and made the default hello world program. Running the program is fine and it outputs correctly in console. But when I debug and step through the program, printf statements does not appear in console. Is there a setting somewhere that I need to change?

like image 239
Hyperian Avatar asked Nov 22 '25 06:11

Hyperian


1 Answers

You should add this once or after every printf

fflush(stdout);

For reasons I don't really know, the program output will occur only at the end of the program. Putting this call will force the output everytime there is a printf

like image 173
Joseph Elcid Avatar answered Nov 24 '25 23:11

Joseph Elcid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!