Hyperian
Hyperian

Reputation: 139

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?

Upvotes: 3

Views: 1397

Answers (1)

Joseph Elcid
Joseph Elcid

Reputation: 877

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

Upvotes: 2

Related Questions