Visual Studio 2008中:如何跟踪,调试和控制台输出重定向到输出窗口? [英] Visual Studio 2008: How to redirect Trace, Debug and Console output to the Output window?

查看:2305
本文介绍了Visual Studio 2008中:如何跟踪,调试和控制台输出重定向到输出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近注意到,Visual Studio的输出窗口停笔了我的Debug.WriteLine的消息在我的WinForms应用程序。这既不会输出Trace.WriteLine消息。我也用的DebugView 在运行该应用程序,它显示什么。

I have noticed recently that the Visual Studio "Output window" stopped writing out my Debug.WriteLine messages in my WinForms application. It does neither output the Trace.WriteLine messages. I have also used DebugView while running this application and it shows nothing.

我相信它的工作在某些VS项目前一段时间 - 输出包含调试消息。我们也有,我们经常在生产中使用的DebugView工具调试项目,它显示了所有Trace.WriteLine消息。

I am sure it worked in some VS projects some time ago - the output contained Debug messages. We also have a project that we regularly debug in production using the DebugView tool and it shows all Trace.WriteLine messages.

不过,我刚发现,目前在我的Visual Studio中,Console.WriteLine现在写入VS输出窗口,同时跟踪和的Debug.WriteLine没有。

However, I just found out that currently in my Visual Studio, Console.WriteLine now writes to the VS Output window while the Trace and Debug.WriteLine do not.

如何到Visual Studio中控制调试跟踪和控制台输出重定向?

推荐答案

跟踪,调试和控制台去输出窗口,如果你从下拉菜单和应用程序的输出选项显示输出选择Debug选择(右键点击输出窗口)。

Trace, Debug, and Console go to the Output window if you select Debug in the Show output from drop down and the Program Output option is selected (right click in output window).

AFAIK控制台只重定向到输出非控制台应用程序。检查项目属性,并确保它说,无论是类库或Windows应用程序的输出类型下拉。

AFAIK console is only redirected to output for non-console applications. Check the project properties and make sure it says either Class Library or Windows Application in the output type drop down.

这篇关于Visual Studio 2008中:如何跟踪,调试和控制台输出重定向到输出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆