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

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

问题描述

可以在C#中捕获调试输出(创建调试侦听器)吗?

Is it possible to capture debug output (create debug listener) in C#?

我想要具有像 DebugView ,但我想将调试输出记录到SQL Server。或者更好的方法是使DebugView登录到一个文件,然后将文件提供给SQL Server?

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 capturer http://www.codeproject.com/KB/trace/DbMonNET.aspx似乎做你想要的。

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

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