在非调试模式下,在Visual Studio的输出窗口中显示消息吗? [英] Display a message in Visual Studio's output window when not debug mode?

查看:94
本文介绍了在非调试模式下,在Visual Studio的输出窗口中显示消息吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中,您可以使用System.out.println(message)将消息打印到输出窗口.

In Java, you can use System.out.println(message) to print a message to the output window.

Visual Studio中的等效功能是什么?

What's the equivalent in Visual Studio ?

我知道我处于调试模式时,可以使用它在输出窗口中查看消息:

I know when I'm in debug mode I can use this to see the message in the output window:

Debug.WriteLine("Debug : User_Id = "+Session["User_Id"]);
System.Diagnostics.Trace.WriteLine("Debug : User_Id = "+Session["User_Id"]);

如何在不使用Visual Studio进行调试的情况下完成此操作?

How can this be done without debugging in Visual Studio?

推荐答案

结果不在输出"窗口中,而是在测试结果详细信息"中(底部的测试结果"窗格,右键单击测试结果",然后转到"TestResultDetails").

The results are not in the Output window but in the Test Results Detail (TestResult Pane at the bottom, right click on on Test Results and go to TestResultDetails).

这适用于Debug.WriteLine和Console.WriteLine.

This works with Debug.WriteLine and Console.WriteLine.

这篇关于在非调试模式下,在Visual Studio的输出窗口中显示消息吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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