在C#中捕获调试输出 [英] Capture debug output in c#

查看:206
本文介绍了在C#中捕获调试输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道是否有可能在C#中捕捉到调试输出(创建调试监听器)?我想有类似的功能DebugView中有,但我想调试输出登录到SQL Server。 ?或者,也许一个更好的办法是使DebugView的日志文件,然后再喂文件到SQL服务器

do you know if it's possible to capture debug output (create debug listener) in C#? I'd like to have functionality like DebugView has, but I'd like to log debug output to SQL server. Or maybe a better way would be to make DebugView log to a file, and then feed the file to SQL server?

编辑:
我实现了的TraceListener ,并把它添加到 Debug.Listeners 收藏,但它似乎捕捉到调试只能从我的应用程序。我想要做的是从所有应用程序捕获调试,有没有办法做到这一点?

I've implemented TraceListener and added it to Debug.Listeners collection, but it seems to capture debug only from my application. What I want to do is to capture debug from all applications, is there a way to do that?

推荐答案

DBMON .NET - 一个简单的.NET的OutputDebugString的捕捉的为 HTTP://www.codeproject .COM / KB /跟踪/ DbMonNET.aspx 似乎做你想做的。

DbMon.NET - A simple .NET OutputDebugString capturer at http://www.codeproject.com/KB/trace/DbMonNET.aspx seems to do what you want.

这篇关于在C#中捕获调试输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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