This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The external I/O window that opens when debugging an application does not open when you run the application outside the debugger. For example, if you run the Quote application, the cout messages are displayed in the Output window of the IDE, and input must be entered in the Input field of the Output window. But the input and output are out of synch, so the input prompts do not appear until after input is entered.
Ann, I think it is intentionally implemented this way. When a program runs under debugger, it runs with a real terminal window, which is external I/O window. When it runs without debugger, it runs with built-in output window. I agree that there is some kind of inconsistency, and I think you suggest to use external I/O window by default in both cases, correct? If yes, this is not a DEFECT, but mostly a request for ENHANCEMENT, because both modes can be useful for users, and we shall provide a project property to specify which mode user wants - internal or external program I/O window. Another problem ("input and output are out of synch") has its own IZ: 76173 http://www.netbeans.org/issues/show_bug.cgi?id=76173
I assigned this bug to myself just in case we decide to change the default and use external I/O window for execution without debugging. If we do not plan to implement it for this release, I'll downgrade the priority.
this bug should be fixed by CND1-FCS.
We discussed this issue today (Gordon, Thomas, Nik) and decided not to fix it for Beta 3 (so priority is downgraded to P2). For FCS we decided to provide the following solution: 1. Implement "execution with external terminal" as an option. By default program will use the existing built-in Program I/O window. 2. Implement a new project property: Use External Terminal [ ] (default value is "Disabled"). 3. If user enabled "Use External Terminal" property, program will run with "xterm" on Unix (Solaris and Linux), and with "cmd.exe" on Windows. Note: It is still not known how to run a program with "cmd.exe" on Windows (in debugging mode gdb creates "cmd.exe" window)
Lets have a UI design meeting before you make changes. While I agree in general with your last IZ update, I don't agree with all the specifics. But now isn't the time to discus them (sometime after beta3 would be better).
Yes, of course, a UI design meeting before making changes would be very helpful. If you have any specific comments, objections, suggestions, ... - please add them to this IZ, so we all will have some time to think about it.
*** Issue 87345 has been marked as a duplicate of this issue. ***
Added comments from IZ 87345, which was closed as duplicate of this IZ: ------------------------ alexandrov wrote: ----------------------------- Open Quote sample project. Run project(F6). Project ask to enter customer name, but you will see it only after input this name. Next commands of this project also appear only after their execution. After all we receive "Run failed"... Try debug the project(F5). Here commands appear in external console before you execute them :) Final command is "To quit enter Q". Enter it in external console, but you will not quit(for Linux and Solaris. For Windows you will). Type "q" in Command textfield of the internal debugger console. Then you will quit from program(it is abnormal behavior), but debugger session will still alive(you will see "user program running"). Step, continue, finish debugger session buttons are active, but debugger console(gdb) were closed. ---------------------------------------------------------------------------
UI Design for 86984 Define 2 properties on the Running node of Project Properties: 1st property is a dropdown menu named "Console Type": 3 choices: 1st value: "Default" [for cnd1 this should be "External Terminal"] 2nd value: "External Terminal" 3rd value: "Output Window (Input only)" 2nd property is a dynamic dropdown menu named "Terminal Type": Possible Values: Unix choices: "Default" Do path searches on "gnome-terminal", "konsole", and "xterm" and include any/all found. Note: If you know what the terminal name on a Mac is feel free to include it in this list. Show just the name but exec by path. Windows choice (only 1 choice, for cnd1): "Command Window" Property Descriptions: The properties in project properties have a textual description field below the actual properties. If you select the property name the description is displayed (r/o) in the description field. Currently we *really* botch this and typically show only the property name. You should provide a real description for both properties. Execution Behavior: The Run Project and Run Main Project actions should run the exe from the choice given by the Console Type property. If its set to External Terminal then the appropriate terminal should be execed.
I assume that Gordon is working on this issue, so I removed my name from RE.
Use case: 1. User wants to run a simple program which prints a prompt, waits for a numeric input, and prints the number 2. After setting up the project, user selects Run->Run Main Project 3. The user had not changed either of the properties mentioned above. The default console type is external so the program is started with the default terminal type for that platform (this *is* platform dependent so I don't say what the default is). Lets assume gnome-terminal is the default (if found on the user's path), konsole if gnome-terminal wasn't found but konsole is, and xterm if neither was found but xterm is. If none of these are look for them in /usr/bin and /usr/X11/bin and take the 1st one found. 4. The program runs in a gnome-terminal, prints the prompt, and the user types a number and presses Return. 5. The number is printed in the gnome-terminal The overall behavior (other than the properties to choose the terminal program) are similar to gdb-lite.
Assigning to myself.
There are UI changes associated with this fix. First off, 2 new properties have been created on the project Running node. The 1st propertyis "Console Type" and it can have values of "Default", "External Terminal", or "Output Window (input only)". The Default is currently External Terminal. This controls where a project runs with respect to I/O. If external, a terminal emulator is started and I/O is to/from that terminal. The 2nd property controls which terminal emulator to use. The name of this property is "Terminal Type". On Windows, there is only 1 real choice (there "Default" and "Command Window" selections in the menu, but both start a command window). On Unix, we look for gnome-terminal, konsole, or xterm and provide as many of those as found. The default is the 1st of those found. We search the users path, but also append various locations these programs are often found. There is not enough consistency between different Unix* to have a single default! This fix impacts UI because a window is now started in the default cases when a program is run. Its a big in-your-face, but since the NetBeans output window doesn't handle input properly (do I need to look up the IZs we've filed on this:-), this is the temporary solution we've implemented. Note that this is the solution Microsoft's Visual Studio uses.