重定向Console.Write ...调试Visual Studio的输出窗口的方法 [英] Redirect Console.Write... Methods to Visual Studio's Output Window While Debugging
本文介绍了重定向Console.Write ...调试Visual Studio的输出窗口的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从 Visual Studio 中的控制台应用程序项目,我想将控制台
的输出重定向到输出窗口。
From a Console Application project in Visual Studio, I want to redirect Console
's output to the Output Window while debugging.
推荐答案
调试前将应用程序类型更改为Windows。没有控制台窗口,Console.WriteLine像Trace.WriteLine一样工作。调试后不要忘记将应用程序重新设置为控制台类型。
Change application type to Windows before debugging. Without Console window, Console.WriteLine works like Trace.WriteLine. Don't forget to reset application back to Console type after debugging.
这篇关于重定向Console.Write ...调试Visual Studio的输出窗口的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文