本文介绍了看到控制台输出在Visual Studio 2010?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个简单的C#程序与一些输出( Console.WriteLine(...); )。问题是,我每次运行它​​的时候,我看不到程序的输出窗口输出。

I am writing a simple C# program with some outputs (Console.WriteLine("...");). The problem is, each time I run it, I cannot see the program's output in the output window.

程序输出标签已经被选中了,我已经重定向所有输出到中间的窗口,但无济于事。

The "program output" tag is already checked, and I already redirected all outputs to the intermediate window but to no avail.

我如何能看到程序的输出?

How do I enable seeing the program's output?

我不认为问题出在我的代码。我试图运行一个简单的程序,仅仅输出一个字符串和readlineALA世界你好,我仍然无法看到任何输出。现在的问题是不是支持我寻找在错误的位置或Visual Studio出于输出。

I don't think the problem lies with my code. I tried running a simple program that just outputs a string and readline "ala hello world" and I am still unable to see any output. The problem is either with me looking for the output in the wrong location or Visual Studio acting out.

debug.write 方法也不起作用。

使用 debug.Write ,它所有的作品,虽然它没' Ť之前。无论是什么窃听了我我重新启动之前或者我只是需要休息一下,无论哪种方式,现在一切都很好。感谢所有的有用的意见=)

Using debug.Write, it all works, though it didn't before. Either something bugged out with me before I restarted or I just need to take a break, either way it's all good now. Thanks all for the helpful comments =)

推荐答案

您可以使用的或 System.Runtime.InteropServices 方法将消息写入输出窗口。

You can use the System.Diagnostics.Debug.Write or System.Runtime.InteropServices method to write messages to the Output Window.

这篇关于看到控制台输出在Visual Studio 2010?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:21
查看更多