Community
Participate
Working Groups
Build Identifier: Version: Juno Release Build id: 20120614-1722 I'm running windows 7 32bit,eclipse juno for c++ developer 32bit and mingw32. Two issue appears here when i debug my app: 1) No console output( eg.printf(...) ). I googled the bug and add mingw path in eclipse ,it doesn't work. 2).Ignore my input function for me to input values. for example, char s[255],*p,*q; int i=0,n; fgets(s,255,stdin);// the debugger ignore the function and disallow me to give an input p = q = s; * s[strlen(s)-1] = '\0';// toggle breakpoint at this line Reproducible: Always
FYI, After i added fflush(stdout) after printf() or added the following lines setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); in the start of the main function to do debugging again, the debugger halted and said: '*stopped,reason="end-stepping-range",frame={addr="0x004014f5",func="main",args=[],file="..\ReverseString.c",fullname="D:\Users\workspace\Reverse_String\ReverseString.c",line="36"},thread-id="1",stopped-threads="all"' .
I hava tried again and found some interest thing. if i changed my code from 'printf("%c",*p)' to 'printf("%c\n",*p)', the debugger console finally showed the output. Seems as if the standard output is buffered and the buffer is flushed on newline during debugging. But it always shows output normally when i just run my app, that ' s weird.
After i added "set new-console on" command into .gdbinit file and now eclipse debugger works well with externel input/output console window(it shows output and waits for my input before running at the breakpoint ). Maybe the bug is only related to eclipse's internal console on windows OS platform.
*** This bug has been marked as a duplicate of bug 231883 ***