Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Mon, 25 Feb 2008 10:15:06 -0500,    group: microsoft.public.vstudio.development        back       


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
date: Mon, 25 Feb 2008 10:15:06 -0500   author:   Dmitrii Tchekhovskoi

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us