When trying to debug a program on Windows I can't seem to find where the output I push to stderr is going. How do I get a hold of my stderr output? Is there a debugger-level setting (MSVC 9) I can change to redirect stderr to some part of the UI?
Update: I have not looked into TRACE
or OutputDebugString
, but the code base is cross-platform, so platform-specific APIs, while not totally off the table, are secondary to a standards-compliant solution.
Another approach, using files:
http://msdn.microsoft.com/en-us/library/aa236457(VS.60).aspx
When you have a GUI process stderror should show up in the output window in visual studio. You can open a new console window if you want to have the output go there.look at the output. See my answer to this question. for details.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.