如何使用控制台输出在ASP.NET环境? [英] How to use console output in an ASP.NET environment?

查看:458
本文介绍了如何使用控制台输出在ASP.NET环境?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想请求处理过程中打印一些痕迹。

I would like to print some traces during the requests processing.

但是,当我在这样的环境让Console.WriteLine(东西),表示什么都没有。

But when I make Console.WriteLine("something") in this environment, nothing is shown.

缺什么,我需要什么才能使用控制台来打印这些痕迹做?

What is missing, what do I need to do in order to use console to print these traces?

推荐答案

使用 Debug.Write()键,并观看结果出来,通过在调试器输出窗口IDE。

Use Debug.Write() and and watch the results come out through the debugger output window in the IDE.

另外,使用 ASP.NET跟踪功能,这是相当强大。一旦启用跟踪,你可以浏览到的trace.axd页面在你的web应用程序的根目录。该页面将显示您的应用程序跟踪消息。

Alternatively, use the ASP.NET trace feature, which is quite powerful. Once you have enabled tracing, you can navigate to the trace.axd page in your web app's root directory. This page will show the trace messages for your app.

这篇关于如何使用控制台输出在ASP.NET环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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