如何在 ASP.Net MVC 3 中使用 Console.WriteLine [英] How to use Console.WriteLine in ASP.Net MVC 3
问题描述
我想在我的 Asp.net MVC 3 项目中使用 Console.writeline.我不知道该怎么做.我也尝试使用 System.Diagnostics.Debug.WriteLine()
方法,但它也不起作用.任何人都可以为此提出解决方案
I want to Use Console.writeline in my Asp.net MVC 3 Project. i don't know how to do it. i also try using System.Diagnostics.Debug.WriteLine()
method but it also doesn't work. can any one suggest a solution for this
推荐答案
Debug.WriteLine("My debug string here");
应该可以解决问题.检查您的应用程序是否处于调试而不是发布:
should do the trick. Check that your application is in debug not release:
如果您的调试窗口没有显示任何内容,请右键单击您的项目.选择属性.在打开的选项卡的左侧,单击构建.有一个复选框Define DEBUG constant",确保它被点击.
If nothing is coming out on your debug window, right click your project. Select properties. On the left of the opened tab, click Build. There is a check-box "Define DEBUG constant", make sure it is clicked.
您很可能知道如何设置调试信息以显示在输出窗口中(Debug->Windows->Output):
You most likely know how to set the debug information to show in the output window (Debug->Windows->Output):
这篇关于如何在 ASP.Net MVC 3 中使用 Console.WriteLine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!