[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] The old problem of buffering in the console (Windows)
|
It's a tough call. In some way, I'd feel more
comfortable as a
user seeing the native console, as that is the target app's natural
environment. However it's more convenient seeing the output in an Eclipse
view. But if the Eclipse console doesn't provide the same level of
functionality and performance as the native console, then I'd at least
like to be given the option to choose between the native and Eclipse
console. And if hosting the output in Eclipse is buggy and not fixable,
then it's a no brainer in my opinion. We need to at least give users the
choice.
John
At 11:10 AM 3/31/2010, Doug Schaefer wrote:
Yes, that isn't a
solution.
We worked hard in the CDT to hide the Windows console that pops up when
debugging console applications. I wonder if maybe that's the wrong
approach. The Windows console is evil but it does it's job well. But then
people were a little put off by the window popping up at debug time.
Anyone have thoughts on that?
On Wed, Mar 31, 2010 at 8:48 AM, Omer Strulovich
<omers@xxxxxxxxxxxxxxxxx
> wrote:
- Changing the code so it could work in Eclipse is a horrible
solution.
- Also, this solution does help in the following case:
- #include <stdio.h>
- int main(void) {
- setvbuf(stdout, NULL, _IONBF,
0);
- setvbuf(stderr, NULL, _IONBF,
0);
-
fprintf(stderr,"stderr\n");
-
fprintf(stdout,"stdout\n");
- return 0;
- }
- You will have both possible outputs:
- stderr
- stdout
- or:
- stdout
- stderr
- This is enough to convince all but the strong-hearted programmers to
revert to Visual.
- I will look at the bug suggested and see if I could apply some kind
of a real fix.
- -Omer
- On Wed, Mar 31, 2010 at 4:02 PM, Marc Khouzam
<
marc.khouzam@xxxxxxxxxxxx> wrote:
- I don't understand your request.
- You mention a buffering problem, which you seem to have a solution
for,
- but then you mention mixed stdout and stderr, which does not seem
releated
- to the buffering issue.
-
- What would you like to solve?
-
- Marc
-
- From:
cdt-dev-bounces@xxxxxxxxxxx
[
mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Omer
Strulovich
- Sent: Wednesday, March 31, 2010 8:32 AM
- To: CDT General developers list.
- Subject: [cdt-dev] The old problem of buffering in the console
(Windows)
- If you've used Eclipse CDT on Windows you know that the Eclipse
console has buffering problems.
- Basically, it doesn't flush the streams when a newline is received.
(Unlike a normal windows console window)
- Until lately I used to either add fflush calls when needed or add the
following lines in the start of the main function:
- setvbuf(stdout, NULL, _IONBF, 0);
- setvbuf(stderr, NULL, _IONBF, 0);
- Since we're using Eclipse CDT as the recommended IDE for a software
development course I need some solution or workaround to allow my
students work on CDT.
- Having mixed stdout & stderr is unacceptable for a programming
newbie. (Seriously, this bug is probably preventing hundred of new C/C++
programmers working on windows from seriously using Eclipse instead of
Visual)
- I would love if someone could help me with a workaround.
- Or even better, direct me to the right piece of code in Eclipse where
I can solve this problem myself and be done with it. (I have the time and
necessary skills)
- -Omer
- _______________________________________________
- cdt-dev mailing list
- cdt-dev@xxxxxxxxxxx
-
https://dev.eclipse.org/mailman/listinfo/cdt-dev
- _______________________________________________
- cdt-dev mailing list
- cdt-dev@xxxxxxxxxxx
-
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev