Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 GTB5 (.NET CLR 3.5.30729) Build Identifier: 20090619-0625 It's work in Run mode, but not in Debug. I use Eclipse IDE for C/C++ Developers on Windows XP. I haven't tried it in Linux. The symptoms is like in: https://bugs.eclipse.org/bugs/show_bug.cgi?id=217922 Reproducible: Always
Denis, could you run some tracing (an example of EOF when it works and an example of EOF when it doesn't). http://wiki.eclipse.org/Platform_Command_Framework#Tracing_Option commandId = org.eclipse.debug.ui.commands.eof Specify the commandId to get specific eof command information. PW
Created attachment 147882 [details] Debug trace with correct Ctrl-Z functionality Used debug options: org.eclipse.ui/debug=true org.eclipse.ui/trace/keyBindings=true org.eclipse.ui/trace/keyBindings.verbose=true org.eclipse.ui/trace/sources=true org.eclipse.ui/trace/handlers=true org.eclipse.ui/trace/handlers.verbose=true org.eclipse.ui/trace/handlers.verbose.commandId=org.eclipse.debug.ui.commands.eof org.eclipse.ui/trace/contexts=true org.eclipse.ui/trace/contexts.verbose=true
Created attachment 147883 [details] Debug trace with incorrect Ctrl-Z functionality Used debug options: org.eclipse.ui/debug=true org.eclipse.ui/trace/keyBindings=true org.eclipse.ui/trace/keyBindings.verbose=true org.eclipse.ui/trace/sources=true org.eclipse.ui/trace/handlers=true org.eclipse.ui/trace/handlers.verbose=true org.eclipse.ui/trace/handlers.verbose.commandId=org.eclipse.debug.ui.commands.eof org.eclipse.ui/trace/contexts=true org.eclipse.ui/trace/contexts.verbose=true
Thanx Denis, From your trace where EOF didn't work, it still looks like we're executing the handlers: HANDLERS >>> Command('org.eclipse.debug.ui.commands.eof') has changed to 'org.eclipse.debug.internal.ui.views.console.ProcessConsolePageParticipant$EOFHandler@1770bec' as its handler KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x0, keyCode = 0x30, time = 23555078, character = 0x30) KEYS >>> WorkbenchKeyboard.press(potentialKeyStrokes = [0]) KEYS >>> Listener.handleEvent(type = Traverse, stateMask = 0x0, keyCode = 0xd, time = 23555796, character = 0xd) KEYS >>> WorkbenchKeyboard.press(potentialKeyStrokes = [CR]) KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x0, keyCode = 0xd, time = 23555796, character = 0xd) KEYS >>> WorkbenchKeyboard.press(potentialKeyStrokes = [CR]) KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x0, keyCode = 0x40000, time = 23556031, character = 0x0) KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x40000, keyCode = 0x7a, time = 23556578, character = 0x1a) KEYS >>> WorkbenchKeyboard.press(potentialKeyStrokes = [CTRL+Z]) KEYS >>> WorkbenchKeyboard.executeCommand(commandId = 'org.eclipse.debug.ui.commands.eof', parameters = {}) I've passed this onto Debug to comment. It looks like the handler is set correctly and we're executing the command. But the symptom is this works in Run mode but not in Debug. PW
Works for me in run and debug mode using the Eclipse SDK and Java debugger. Moving to CDT for comment.
I tried following on Linux. (Eclipse IDE for C/C++ Developers, Build id: 20090619-0625) The program's source code is: #include <stdio.h> int main() { int n; while (scanf("%d", &n) != EOF) { printf("echo: %d\n", n); fflush(stdout); } printf("end of input\n"); fflush(stdout); } After launching the program in a Linux terminal, I can enter: 1<ENTER> 2<ETRER> 3<ENTER> <CTRL+D> to get this: echo: 1 echo: 2 echo: 3 end of input But if I enter the same in Eclipse, then it output just this: echo: 1 echo: 2 echo: 3 There is no "end of input". And when I enter new numbers, it doesn't echoes. Seems that it stops send new input to the program but not sends EOF. So the Linux port have same problem. And it doesn't work even in Run mode (not only in Debug).
Is a duplicate of bug #159803
There is the same problem in Eclipse MARS 3.2 on Windows 8 and Java SE. In Debugging Perspective, the console does not recognize EOF signal (ctrl + z). Here it is my workaround: change perspective and then focus by clicking on another form. After that go back to debug perspective and then click to the console form. Now press crtl + z (EOF on Windows) and it should catch the right input