console app stdout redirection doesn't work under VS2008 debugger



Hi,

It looks like the redirection of stdin/stdout/stderr under VS 2008 Local Windows Debugger does not work for native code.

I have just installed VS 2008 Pro under WinXP, created Win32 MFC console application with default settings, added to its code a single line
cout << "Hello World" << endl;
After that in Debug configuration added to Configuration Properties/Debugging/Command Arguments line the following:
> output.txt
and set a breakpoint to the last line, return nRetCode;

When I ran the application, it stopped at the breakpoint and the console window displayed one line:
Hello World
(which by itself is an evidence that no redirection has occurred); after I selected Debug/Continue the application exited without creating the output.txt file.

This is very inconvenient and different from VS2005 behavior.

The description of the redirection here
http://msdn2.microsoft.com/en-us/library/kcw4dzyf.aspx
states that "This page is specific to Microsoft Visual Studio 2008/.NET Framework 3.5"

Does this mean that the redirection of stdin/stdout/stderr under VS 2008 Local Windows Debugger does not work for native code by design? (I haven't tried a dot-Net application.)

Thanks.

Dmitrii
.


Loading