When debugging on Windows where does stderr go?

喜你入骨 提交于 2019-12-23 07:30:07

问题


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.


回答1:


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.




回答2:


Another approach, using files:

http://msdn.microsoft.com/en-us/library/aa236457(VS.60).aspx



来源:https://stackoverflow.com/questions/1343320/when-debugging-on-windows-where-does-stderr-go

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!